File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,13 +2,8 @@ plugins {
22 `kotlin- dsl`
33}
44
5- tasks.withType< org.jetbrains.kotlin.gradle.tasks.KotlinCompile > {
6- kotlinOptions.jvmTarget = JavaVersion .VERSION_11 .toString()
7- }
8-
9- java {
10- targetCompatibility = JavaVersion .VERSION_11
11- sourceCompatibility = JavaVersion .VERSION_11
5+ kotlin {
6+ jvmToolchain(17 )
127}
138
149dependencies {
Original file line number Diff line number Diff line change 1- import io.gitlab.arturbosch.detekt.*
2-
31plugins {
42 id(" io.gitlab.arturbosch.detekt" )
53}
64
7- tasks.withType<Detekt >().configureEach {
8- jvmTarget = JavaVersion .VERSION_11 .toString()
9- }
10- tasks.withType<DetektCreateBaselineTask >().configureEach {
11- jvmTarget = JavaVersion .VERSION_11 .toString()
12- }
13-
145dependencies {
156 // noinspection UseTomlInstead
167 detektPlugins(" io.gitlab.arturbosch.detekt:detekt-rules-libraries:1.23.6" )
Original file line number Diff line number Diff line change 1+ import com.redmadrobot.build.dsl.isRunningOnCi
2+ import org.jetbrains.kotlin.gradle.dsl.kotlinExtension
3+ import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
4+
5+ kotlinExtension.jvmToolchain(17 )
6+
7+ // Treat all warnings as errors on CI
8+ val warningsAsErrors = findProperty(" warningsAsErrors" ) == " true" || isRunningOnCi
9+
10+ tasks.withType<KotlinJvmCompile >().configureEach {
11+ compilerOptions {
12+ allWarningsAsErrors = warningsAsErrors
13+ // Keep the library compatible with old versions of Java.
14+ freeCompilerArgs.add(" -Xjdk-release=11" )
15+ }
16+ }
Original file line number Diff line number Diff line change 11plugins {
2- id(" com.redmadrobot.android-library" )
2+ kotlin(" android" )
3+ id(" com.android.library" )
4+ id(" convention.jvm" )
35 id(" convention.publishing" )
46 id(" convention.detekt" )
57}
68
7- redmadrobot {
8- android.minSdk = 21
9+ android {
10+ compileSdk = 34
11+
12+ defaultConfig {
13+ minSdk = 21
14+ }
15+ }
16+
17+ kotlin {
18+ explicitApi()
919}
Original file line number Diff line number Diff line change 11plugins {
2- id(" com.redmadrobot.kotlin-library" )
2+ kotlin(" jvm" )
3+ id(" convention.jvm" )
34 id(" convention.publishing" )
45 id(" convention.detekt" )
56}
7+
8+ kotlin {
9+ explicitApi()
10+ }
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ activity = "1.9.0"
55android-gradle-plugin = " 8.5.1"
66detekt = " 1.23.6"
77gradle-android-cacheFix = " 3.0.1"
8- gradle-infrastructure = " 0.18 .1"
8+ gradle-infrastructure = " 0.19 .1"
99kotlin = " 2.0.0"
1010versionsPlugin = " 0.51.0"
1111publish-plugin = " 0.29.0"
Original file line number Diff line number Diff line change 1+ @file:Suppress(" UnstableApiUsage" )
12enableFeaturePreview(" TYPESAFE_PROJECT_ACCESSORS" )
23
34pluginManagement {
@@ -13,8 +14,13 @@ pluginManagement {
1314 }
1415}
1516
16- @Suppress(" UnstableApiUsage" )
17+ plugins {
18+ id(" org.gradle.toolchains.foojay-resolver-convention" ) version " 0.8.0"
19+ }
20+
1721dependencyResolutionManagement {
22+ repositoriesMode = RepositoriesMode .FAIL_ON_PROJECT_REPOS
23+
1824 repositories {
1925 mavenCentral()
2026 }
You can’t perform that action at this time.
0 commit comments