-
Notifications
You must be signed in to change notification settings - Fork 695
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
78 lines (65 loc) · 2.37 KB
/
build.gradle.kts
File metadata and controls
78 lines (65 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
import org.jetbrains.kotlin.samWithReceiver.gradle.SamWithReceiverExtension
import org.jetbrains.kotlin.samWithReceiver.gradle.SamWithReceiverGradleSubplugin
plugins {
`embedded-kotlin`
id("java-gradle-plugin")
}
plugins.apply(SamWithReceiverGradleSubplugin::class.java)
extensions.configure(SamWithReceiverExtension::class.java) {
annotations(HasImplicitReceiver::class.qualifiedName!!)
}
group = "com.apollographql.apollo.build"
dependencies {
compileOnly(gradleApi())
compileOnly(libs.dgp)
implementation(libs.okhttp)
implementation(libs.kotlinx.benchmark)
implementation(libs.dokka)
implementation(libs.licensee)
implementation(libs.apollo.execution.gradle.plugin)
// We add all the plugins to the classpath here so that they are loaded with proper conflict resolution
// See https://github.com/gradle/gradle/issues/4741
implementation(libs.android.plugin)
implementation(libs.gradle.japicmp.plugin)
implementation(libs.vespene)
implementation(libs.kotlinx.serialization.json)
implementation(libs.poet.java)
implementation(libs.poet.kotlin)
implementation(libs.androidx.lint.gradle.plugin)
implementation(libs.kotlin.plugin.compose)
implementation(libs.kotlin.plugin)
implementation(libs.kotlin.plugin.annotations)
runtimeOnly(libs.ksp)
// XXX: This is only needed for tests. We could have different build logic for different
// builds but this seems just overkill for now
runtimeOnly(libs.kotlin.allopen)
runtimeOnly(libs.kotlinx.serialization.plugin)
runtimeOnly(libs.atomicfu.plugin)
runtimeOnly(libs.sqldelight.plugin)
runtimeOnly(libs.gradle.publish.plugin)
runtimeOnly(libs.benmanes.versions)
runtimeOnly(libs.gr8)
runtimeOnly(libs.kotlinx.binarycompatibilityvalidator)
}
// Keep in sync with CompilerOptions.kt
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
}
tasks.withType<JavaCompile>().configureEach {
options.release.set(17)
}
tasks.withType(KotlinJvmCompile::class.java).configureEach {
compilerOptions.jvmTarget.set(JvmTarget.JVM_17)
}
gradlePlugin {
plugins {
register("build.logic") {
id = "build.logic"
// This plugin is only used for loading the jar using the Marker but never applied
// We don't need it.
implementationClass = "build.logic.Unused"
}
}
}