-
Notifications
You must be signed in to change notification settings - Fork 92
/
settings.gradle.kts
62 lines (53 loc) · 1.77 KB
/
settings.gradle.kts
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
rootProject.buildFileName = "build.gradle.kts"
enableFeaturePreview("VERSION_CATALOGS")
include(
":demo",
":library"
)
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
google()
}
val agpVersion: String by settings
val kotlinVersion: String by settings
val gradleMavenPublishVersion: String by settings
plugins {
id("com.android.application") version agpVersion
id("com.android.library") version agpVersion
id("org.jetbrains.kotlin.jvm") version kotlinVersion
id("org.jetbrains.kotlin.android") version kotlinVersion
id("com.vanniktech.maven.publish") version gradleMavenPublishVersion
}
resolutionStrategy {
eachPlugin {
when (requested.id.id) {
"com.android.application",
"com.android.library" -> {
useModule("com.android.tools.build:gradle:$agpVersion")
}
"com.vanniktech.maven.publish" -> {
useModule(
"com.vanniktech:gradle-maven-publish-plugin:$gradleMavenPublishVersion"
)
}
}
}
}
}
dependencyResolutionManagement {
versionCatalogs {
create("library") {
val coreKtxVersion: String by settings
alias("coreKtx")
.to("androidx.core:core-ktx:$coreKtxVersion")
val appcompatVersion: String by settings
alias("appcompat")
.to("androidx.appcompat:appcompat:$appcompatVersion")
val constraintlayoutVersion: String by settings
alias("constraintlayout")
.to("androidx.constraintlayout:constraintlayout:$constraintlayoutVersion")
}
}
}