-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathbuild.gradle.kts
60 lines (50 loc) · 2.35 KB
/
build.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
plugins {
id("com.android.library")
id("kotlin-android")
}
android {
compileSdk = property("COMPILE_SDK_VERSION").toString().toInt()
defaultConfig {
minSdk = property("MIN_SDK_VERSION").toString().toInt()
targetSdk = property("TARGET_SDK_VERSION").toString().toInt()
consumerProguardFiles("proguard-rules.pro")
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
}
}
buildFeatures {
viewBinding = true
}
}
dependencies {
api(project(":assemblyadapter-common-item"))
api("androidx.collection:collection:${property("ANDROIDX_COLLECTION")}")
api("org.jetbrains.kotlin:kotlin-stdlib-jdk7:${property("KOTLIN")}")
testImplementation("junit:junit:${property("JUNIT")}")
androidTestImplementation("androidx.test:rules:${property("ANDROIDX_TEST_RULES")}")
androidTestImplementation("androidx.test:runner:${property("ANDROIDX_TEST_RUNNER")}")
androidTestImplementation("androidx.test.ext:junit-ktx:${property("ANDROIDX_TEST_EXT")}")
androidTestImplementation("io.github.panpf.tools4j:tools4j-test-ktx:${property("TOOLS4J")}")
androidTestImplementation("io.github.panpf.tools4j:tools4j-reflect-ktx:${property("TOOLS4J")}")
}
/**
* publish config
*/
if (hasProperty("signing.keyId") // configured in the ~/.gradle/gradle.properties file
&& hasProperty("signing.password") // configured in the ~/.gradle/gradle.properties file
&& hasProperty("signing.secretKeyRingFile") // configured in the ~/.gradle/gradle.properties file
&& hasProperty("mavenCentralUsername") // configured in the ~/.gradle/gradle.properties file
&& hasProperty("mavenCentralPassword") // configured in the ~/.gradle/gradle.properties file
&& hasProperty("GROUP") // configured in the rootProject/gradle.properties file
&& hasProperty("POM_ARTIFACT_ID") // configured in the project/gradle.properties file
) {
apply { plugin("com.github.panpf.maven.publish") }
configure<com.github.panpf.maven.publish.MavenPublishPluginExtension> {
sonatypeHost = com.github.panpf.maven.publish.SonatypeHost.S01
disableAndroidJavaDocsAddReferencesLinks = true
}
}