Skip to content

Commit 2863514

Browse files
committed
Set compileSdk, minSdk and targetSdk via settings script
1 parent 7db9f50 commit 2863514

File tree

5 files changed

+27
-33
lines changed

5 files changed

+27
-33
lines changed

sample/app/build.gradle.kts

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
2-
alias(libs.plugins.android.application)
3-
alias(libs.plugins.kotlin.android)
4-
alias(libs.plugins.marathon)
2+
id("com.android.application")
3+
id("org.jetbrains.kotlin.android")
4+
id("com.badoo.marathon")
55
}
66

77
java {
@@ -11,13 +11,9 @@ java {
1111
}
1212

1313
android {
14-
compileSdk = 34
1514
namespace = "com.example"
1615

1716
defaultConfig {
18-
minSdk = 21
19-
targetSdk = 34
20-
2117
applicationId = "com.example"
2218
versionCode = 1
2319
versionName = "1.0"

sample/build.gradle.kts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
plugins {
2-
alias(libs.plugins.android.application) apply false
3-
alias(libs.plugins.android.library) apply false
4-
alias(libs.plugins.kotlin.android) apply false
5-
alias(libs.plugins.marathon)
2+
id("com.android.application") apply false
3+
id("com.android.library") apply false
4+
id("org.jetbrains.kotlin.android") apply false
5+
id("com.badoo.marathon")
66
}
77

88
marathon {

sample/gradle/libs.versions.toml

-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
[versions]
2-
android-gradle-plugin = "8.8.1"
32
androidx-appcompat = "1.7.0"
43
androidx-constraintlayout = "2.1.4"
54
androidx-test-runner = "1.6.2"
65
androidx-test-junit = "1.2.1"
7-
kotlin-gradle-plugin = "2.1.10"
86

97
[libraries]
108
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidx-appcompat" }
119
androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx-constraintlayout" }
1210
androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test-runner" }
1311
androidx-test-junit = { module = "androidx.test.ext:junit", version.ref = "androidx-test-junit" }
14-
15-
[plugins]
16-
android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" }
17-
android-library = { id = "com.android.library", version.ref = "android-gradle-plugin" }
18-
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin-gradle-plugin" }
19-
marathon = { id = "com.badoo.marathon" }

sample/library/build.gradle.kts

+3-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
2-
alias(libs.plugins.android.library)
3-
alias(libs.plugins.kotlin.android)
4-
alias(libs.plugins.marathon)
2+
id("com.android.library")
3+
id("org.jetbrains.kotlin.android")
4+
id("com.badoo.marathon")
55
}
66

77
java {
@@ -11,22 +11,11 @@ java {
1111
}
1212

1313
android {
14-
compileSdk = 34
1514
namespace = "com.example.library"
1615

1716
defaultConfig {
18-
minSdk = 21
19-
2017
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2118
}
22-
23-
lint {
24-
targetSdk = 34
25-
}
26-
27-
testOptions {
28-
targetSdk = 34
29-
}
3019
}
3120

3221
dependencies {

sample/settings.gradle.kts

+17
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,26 @@ pluginManagement {
55
google()
66
maven("https://jitpack.io")
77
}
8+
plugins {
9+
val androidPluginVersion = "8.8.1"
10+
id("com.android.application") version androidPluginVersion
11+
id("com.android.library") version androidPluginVersion
12+
id("com.android.settings") version androidPluginVersion
13+
id("org.jetbrains.kotlin.android") version "2.1.10"
14+
}
815
includeBuild("..")
916
}
1017

18+
plugins {
19+
id("com.android.settings")
20+
}
21+
22+
android {
23+
compileSdk = 34
24+
minSdk = 21
25+
targetSdk = 34
26+
}
27+
1128
dependencyResolutionManagement {
1229
repositories {
1330
mavenCentral()

0 commit comments

Comments
 (0)