Skip to content

Commit 37a9550

Browse files
falhassenglide-copybara-robot
authored andcommitted
Rewriting some of the smaller Gradle build files in Kotlin DSL.
PiperOrigin-RevId: 826616347
1 parent 777b8b5 commit 37a9550

38 files changed

+534
-543
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ Or use Gradle:
2626

2727
```gradle
2828
repositories {
29-
 google()
29+
google()
3030
mavenCentral()
3131
}
3232
3333
dependencies {
34-
 implementation 'com.github.bumptech.glide:glide:5.0.5'
34+
implementation 'com.github.bumptech.glide:glide:5.0.5'
3535
}
3636
```
3737

annotation/build.gradle renamed to annotation/build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
apply plugin: 'java'
1+
plugins {
2+
id("java")
3+
}
24

3-
apply from: "${rootProject.projectDir}/scripts/upload.gradle.kts"
5+
apply(from = "${rootProject.projectDir}/scripts/upload.gradle.kts")
46

57
java {
68
sourceCompatibility = JavaVersion.VERSION_1_7

annotation/compiler/build.gradle

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
plugins {
2+
id("java")
3+
}
4+
5+
dependencies {
6+
implementation(libs.javapoet)
7+
implementation(libs.guava)
8+
9+
compileOnly(libs.autoservice)
10+
compileOnly(libs.findbugs.jsr305)
11+
12+
implementation(project(":annotation"))
13+
annotationProcessor(libs.autoservice)
14+
}
15+
16+
tasks.withType<Javadoc> {
17+
isFailOnError = false
18+
}
19+
20+
apply(from = "${rootProject.projectDir}/scripts/upload.gradle.kts")

annotation/ksp/build.gradle

Lines changed: 0 additions & 20 deletions
This file was deleted.

annotation/ksp/build.gradle.kts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
plugins {
2+
id("org.jetbrains.kotlin.jvm")
3+
id("com.google.devtools.ksp")
4+
}
5+
6+
kotlin { jvmToolchain { languageVersion.set(JavaLanguageVersion.of(11)) } }
7+
8+
dependencies {
9+
implementation(libs.kotlinpoet)
10+
implementation(project(":annotation"))
11+
implementation(libs.ksp.api)
12+
implementation(libs.autoservice.annotations)
13+
14+
ksp(libs.ksp.autoservice)
15+
}
16+
17+
apply(from = "${rootProject.projectDir}/scripts/upload.gradle.kts")

annotation/ksp/integrationtest/build.gradle

Lines changed: 0 additions & 49 deletions
This file was deleted.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/**
2+
* This package verifies that our ksp processor is able to successfully import
3+
* and include LibraryGlideModules compiled in other modules. ksp:test is a more
4+
* comprehensive set of unit tests for other scenarios for library tests.
5+
*
6+
* <p>Technically we could include these integration tests in ksp:test. However
7+
* doing so would cause the dependent library to pollute every individual test
8+
* because it's pulled in from the classpath. Using a separate module allows us
9+
* to keep unit tests that are not concerned with dependent library modules
10+
* separate.
11+
*/
12+
13+
plugins {
14+
id("org.jetbrains.kotlin.android")
15+
id("com.android.library")
16+
}
17+
18+
android {
19+
namespace = "com.bumptech.glide.annotation.ksp.integrationtest"
20+
compileSdkVersion = libs.versions.compile.sdk.version.get()
21+
22+
defaultConfig {
23+
minSdk = libs.versions.min.sdk.version.get().toInt()
24+
}
25+
compileOptions {
26+
sourceCompatibility = JavaVersion.VERSION_11
27+
targetCompatibility = JavaVersion.VERSION_11
28+
}
29+
}
30+
31+
kotlin {
32+
jvmToolchain {
33+
languageVersion.set(JavaLanguageVersion.of(11))
34+
}
35+
}
36+
37+
dependencies {
38+
implementation(libs.junit)
39+
testImplementation(project(":annotation:ksp:test"))
40+
testImplementation(project(":annotation:ksp"))
41+
testImplementation(project(":annotation"))
42+
testImplementation(project(":glide"))
43+
testImplementation(project(":integration:okhttp3"))
44+
testImplementation(libs.ksp.compiletesting)
45+
testImplementation(libs.truth)
46+
testImplementation(libs.kotlin.test)
47+
testImplementation(project(":annotation:ksp:test"))
48+
}

annotation/ksp/test/build.gradle

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
plugins {
2+
id("org.jetbrains.kotlin.android")
3+
id("com.android.library")
4+
}
5+
6+
android {
7+
namespace = "com.bumptech.glide.annotation.ksp.test"
8+
compileSdkVersion = libs.versions.compile.sdk.version.get()
9+
10+
defaultConfig {
11+
minSdk = libs.versions.min.sdk.version.get().toInt()
12+
}
13+
compileOptions {
14+
sourceCompatibility = JavaVersion.VERSION_11
15+
targetCompatibility = JavaVersion.VERSION_11
16+
}
17+
}
18+
19+
kotlin {
20+
jvmToolchain {
21+
languageVersion.set(JavaLanguageVersion.of(11))
22+
}
23+
}
24+
25+
dependencies {
26+
implementation(libs.junit)
27+
implementation(project(":annotation:ksp"))
28+
implementation(libs.ksp.compiletesting)
29+
implementation(libs.truth)
30+
31+
testImplementation(project(":annotation:ksp"))
32+
testImplementation(project(":annotation"))
33+
testImplementation(project(":glide"))
34+
testImplementation(libs.kotlin.test)
35+
}

0 commit comments

Comments
 (0)