Skip to content

Commit

Permalink
Add dagger-compiler as a Gradle project
Browse files Browse the repository at this point in the history
RELNOTES=N/A
PiperOrigin-RevId: 715362633
  • Loading branch information
danysantiago authored and Dagger Team committed Jan 14, 2025
1 parent 9abeba7 commit aa70ca8
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
62 changes: 62 additions & 0 deletions gradle-projects/dagger-compiler/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import dagger.gradle.build.daggerSources

plugins {
alias(libs.plugins.dagger.kotlinJvm)
alias(libs.plugins.dagger.publish)
}

daggerSources {
main.setPackages(
listOf(
"dagger/internal/codegen",
"dagger/internal/codegen/base",
"dagger/internal/codegen/binding",
"dagger/internal/codegen/bindinggraphvalidation",
"dagger/internal/codegen/compileroption",
"dagger/internal/codegen/componentgenerator",
"dagger/internal/codegen/javapoet",
"dagger/internal/codegen/kotlin",
"dagger/internal/codegen/langmodel",
"dagger/internal/codegen/model",
"dagger/internal/codegen/processingstep",
"dagger/internal/codegen/validation",
"dagger/internal/codegen/writing",
"dagger/internal/codegen/xprocessing",
)
)
}

dependencies {
implementation(project(":dagger"))
implementation(project(":dagger-spi"))

implementation(libs.auto.common)
implementation(libs.auto.value.annotations)
annotationProcessor(libs.auto.value.compiler)
implementation(libs.auto.service.annotations)
annotationProcessor(libs.auto.service.compiler)
implementation(libs.checkerFramework)
implementation(libs.findBugs)
implementation(libs.javaFormatter)
implementation(libs.javaPoet)
implementation(libs.javax.inject)
implementation(libs.gradleIncap.annotations)
annotationProcessor(libs.gradleIncap.compiler)
implementation(libs.guava.failureAccess)
implementation(libs.guava.jre)
implementation(libs.kotlin.stdlib)
implementation(libs.kotlin.metadataJvm)
implementation(libs.kotlinPoet)
implementation(libs.ksp.api)

annotationProcessor(
files(project.rootProject.layout.projectDirectory
.dir("java/dagger/internal/codegen/bootstrap")
.file("bootstrap_compiler_deploy.jar"))
)
implementation(
files(project.rootProject.layout.projectDirectory
.dir("java/dagger/internal/codegen/xprocessing")
.file("xprocessing.jar"))
)
}
10 changes: 10 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[versions]
autoValue = "1.9"
autoService = "1.0"
guava = "33.0.0-jre"
gradleIncap = "0.2"
jdk = "18"
junit = "4.13"
jvmTarget = "1.8"
Expand All @@ -14,16 +16,24 @@ truth = "1.4.0"
auto-common = { module = "com.google.auto:auto-common", version = "1.2.1" }
auto-value-annotations = { module = "com.google.auto.value:auto-value-annotations", version.ref = "autoValue" }
auto-value-compiler = { module = "com.google.auto.value:auto-value", version.ref = "autoValue" }
auto-service-annotations = { module = "com.google.auto.service:auto-service-annotations", version.ref = "autoService" }
auto-service-compiler = { module = "com.google.auto.service:auto-service", version.ref = "autoService" }
checkerFramework = { module = "org.checkerframework:checker-compat-qual", version = "2.5.3" }
findBugs = { module = "com.google.code.findbugs:jsr305", version = "3.0.1" }
javaFormatter = { module = "com.google.googlejavaformat:google-java-format", version = "1.5" }
guava-jre = { module = "com.google.guava:guava", version.ref = "guava" }
guava-failureAccess = { module = "com.google.guava:failureaccess", version = "1.0.1" }
gradleIncap-annotations = { module = "net.ltgt.gradle.incap:incap", version.ref = "gradleIncap" }
gradleIncap-compiler = { module = "net.ltgt.gradle.incap:incap-processor", version.ref = "gradleIncap" }
jakarta-inject = { module = "jakarta.inject:jakarta.inject-api", version = "2.0.1" }
javaPoet = { module = "com.squareup:javapoet", version = "1.13.0" }
javax-inject = { module = "javax.inject:javax.inject", version = "1" }
jspecify = { module = "org.jspecify:jspecify", version = "1.0.0" }
junit = { module = "junit:junit", version.ref = "junit" }
kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin-metadataJvm = { module = "org.jetbrains.kotlin:kotlin-metadata-jvm", version.ref = "kotlin" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlinPoet = { module = "com.squareup:kotlinpoet", version = "1.11.0" }
ksp-api = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" }
publishPlugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "publish" }
truth = { module = "com.google.truth:truth", version.ref = "truth" }
Expand Down
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ fun includeProject(name: String, path: String) {

includeProject(":dagger", "gradle-projects/dagger-runtime")
includeProject(":dagger-spi", "gradle-projects/dagger-spi")
includeProject(":dagger-compiler", "gradle-projects/dagger-compiler")

0 comments on commit aa70ca8

Please sign in to comment.