1
- import org.jetbrains.kotlin.config.KotlinCompilerVersion
2
-
3
1
// Module :library
4
-
5
2
plugins {
6
3
id ' com.android.library'
7
4
id ' kotlin-android'
@@ -10,28 +7,24 @@ plugins {
10
7
}
11
8
12
9
android {
13
- compileSdk 32
10
+ compileSdk compile_sdk
14
11
defaultConfig {
15
- minSdk 21
16
- targetSdk 32
17
- buildToolsVersion " 32.0.0 "
12
+ minSdk min_sdk
13
+ targetSdk target_sdk
14
+ buildToolsVersion build_tools_version
18
15
setProperty(' archivesBaseName' , ' colorpicker' )
19
16
testInstrumentationRunner ' androidx.test.runner.AndroidJUnitRunner'
20
17
consumerProguardFiles " ${ project.rootDir} /proguard/consumer.pro"
21
18
}
22
19
compileOptions {
23
- sourceCompatibility JavaVersion . VERSION_11 . toString()
24
- targetCompatibility JavaVersion . VERSION_11 . toString()
20
+ sourceCompatibility java_version
21
+ targetCompatibility java_version
25
22
}
26
23
kotlinOptions {
27
- jvmTarget = JavaVersion . VERSION_11 . toString()
28
- }
29
- kapt {
30
- // correctErrorTypes true
31
- // keepJavacAnnotationProcessors = true
24
+ jvmTarget = java_version
32
25
}
33
26
composeOptions {
34
- kotlinCompilerExtensionVersion " 1.2.0 "
27
+ kotlinCompilerExtensionVersion " $c ompose_compiler "
35
28
}
36
29
packagingOptions {
37
30
resources. pickFirsts. add(' META-INF/LGPL2.1' )
@@ -68,20 +61,21 @@ android {
68
61
69
62
dependencies {
70
63
64
+ implementation ' com.google.android.material:material:1.6.1'
65
+ // implementation "com.google.android.material:compose-theme-adapter-3:1.0.13"
66
+
67
+ implementation ' androidx.core:core-ktx:1.8.0'
71
68
implementation ' androidx.appcompat:appcompat:1.4.2'
72
69
implementation ' androidx.preference:preference-ktx:1.2.0'
73
- implementation ' androidx.core:core-ktx:1.8.0'
74
70
75
- implementation ' com.google.android.material:material:1.6.1'
76
- // implementation "com.google.android.material:compose-theme-adapter-3:1.0.13"
77
- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk8:${ KotlinCompilerVersion.VERSION} "
71
+ implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version "
78
72
// implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.2'
79
73
80
74
// https://mvnrepository.com/artifact/androidx.compose
81
75
implementation " androidx.compose.ui:ui:$compose_version "
82
76
implementation " androidx.compose.material:material:$compose_version "
83
77
implementation " androidx.compose.foundation:foundation:$compose_version "
84
- implementation " androidx.compose.material:material-icons-core:$compose_version "
78
+ // implementation "androidx.compose.material:material-icons-core:$compose_version"
85
79
// implementation 'androidx.compose.material:material-icons-extended:$compose_version'
86
80
87
81
/* Compose Preview */
@@ -111,6 +105,7 @@ task javadoc(type: Javadoc) {
111
105
options. author true
112
106
113
107
doFirst {
108
+
114
109
// extract AAR files
115
110
configurations. implementation. filter { it. name. endsWith(' .aar' ) }. each { aar ->
116
111
copy {
@@ -119,6 +114,7 @@ task javadoc(type: Javadoc) {
119
114
into " $buildDir /tmp/aarsToJars/${ aar.name.replace('.aar', '')} /"
120
115
}
121
116
}
117
+
122
118
// provide JAR, which contains the generated data-binding classes
123
119
def aar_main = new File (" $buildDir /intermediates/aar_main_jar" )
124
120
if (aar_main. exists()) {
@@ -135,31 +131,31 @@ javadoc.onlyIf {
135
131
}
136
132
137
133
task javadocJar (type : Jar , dependsOn : javadoc) {
138
- archiveClassifier. set(" javadoc" )
134
+ archiveClassifier. set(' javadoc' )
139
135
from javadoc. destinationDir
140
136
}
141
137
142
138
task sourcesJar (type : Jar ) {
143
139
from android. sourceSets. main. java. srcDirs
144
- archiveClassifier. set(" sources" )
140
+ archiveClassifier. set(' sources' )
145
141
}
146
142
147
143
artifacts {
148
144
archives javadocJar
149
145
archives sourcesJar
150
146
}
151
147
152
- group = " io.syslogic"
153
- version = " $ version_name "
148
+ group = ' io.syslogic'
149
+ version = version_name
154
150
155
151
afterEvaluate {
156
152
publishing {
157
153
publications {
158
154
release(MavenPublication ) {
159
- groupId = " io.syslogic"
160
- artifactId = " androidx-colorpicker"
155
+ groupId = ' io.syslogic'
156
+ artifactId = ' androidx-colorpicker'
161
157
from components. getByName(' release' )
162
- version = " $ version_name "
158
+ version = version_name
163
159
pom {
164
160
name = ' Color Picker'
165
161
description = ' A simple color-picker library for Android'
0 commit comments