-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
60 lines (54 loc) · 1.87 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
60 lines (54 loc) · 1.87 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
import com.android.build.gradle.internal.scope.ProjectInfo.Companion.getBaseName
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.1.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.10")
}
}
subprojects {
repositories {
google()
mavenCentral()
}
apply(plugin = "com.android.library")
apply(plugin = "kotlin-android")
apply(plugin = "maven-publish")
plugins.withType(com.android.build.gradle.LibraryPlugin::class) {
extensions.configure(com.android.build.gradle.LibraryExtension::class.java) {
namespace = "com.wrabot.tools.${name.removePrefix("tools-")}"
compileSdk = 34
defaultConfig {
minSdk = 21
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("proguard-rules.txt")
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
}
extensions.configure(PublishingExtension::class.java) {
val artifactName = name
publications {
register<MavenPublication>("release") {
groupId = "com.github.wrabot.AndroidKotlinTools"
artifactId = artifactName
version = "0.17"
afterEvaluate {
from(components["release"])
}
}
}
}
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
jvmTarget = "17"
}
}
}