1
- apply plugin : ' com.android.library'
2
- apply plugin : ' kotlin-android'
3
- apply plugin : ' com.github.dcendents.android-maven'
1
+ plugins {
2
+ id ' com.android.library'
3
+ id ' kotlin-android'
4
+ id ' maven-publish'
5
+ }
4
6
5
7
repositories {
6
8
mavenCentral()
@@ -13,62 +15,47 @@ group = 'com.github.jitpack'
13
15
version = ' 1.0'
14
16
15
17
android {
16
- compileSdkVersion 29
17
- buildToolsVersion " 28.0.3"
18
+ compileSdkVersion 30
18
19
19
20
defaultConfig {
20
21
minSdkVersion 21
21
- targetSdkVersion 29
22
+ targetSdkVersion 30
22
23
versionCode 1
23
- versionName version
24
- testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
24
+ versionName " 1.0"
25
25
}
26
+
26
27
buildTypes {
27
28
release {
28
29
minifyEnabled false
29
- proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
30
+ proguardFiles getDefaultProguardFile(' proguard-android-optimize .txt' ), ' proguard-rules.pro'
30
31
}
31
32
}
32
- lintOptions {
33
- abortOnError false
33
+ compileOptions {
34
+ sourceCompatibility JavaVersion . VERSION_1_8
35
+ targetCompatibility JavaVersion . VERSION_1_8
34
36
}
35
- sourceSets {
36
- main. java. srcDirs + = ' src/main/kotlin'
37
- androidTest. java. srcDirs + = ' src/androidTest/kotlin'
38
- androidTest. resources. srcDirs + = ' src/androidTest/res'
37
+ kotlinOptions {
38
+ jvmTarget = ' 1.8'
39
39
}
40
40
}
41
41
42
42
dependencies {
43
- testImplementation ' junit:junit:4.12'
44
- androidTestImplementation ' androidx.test.ext:junit:1.1.1'
45
- androidTestImplementation ' androidx.test.espresso:espresso-core:3.2.0'
46
-
47
- implementation ' androidx.appcompat:appcompat:1.0.2'
48
43
implementation " org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version "
49
- }
50
-
51
- task sourcesJar (type : Jar ) {
52
- classifier = ' sources'
53
- from android. sourceSets. main. java. sourceFiles
54
- }
55
-
56
- task javadoc (type : Javadoc ) {
57
- source = android. sourceSets. main. java. sourceFiles
58
- classpath + = project. files(android. getBootClasspath(). join(File . pathSeparator))
59
- }
60
-
61
- task javadocJar (type : Jar , dependsOn : javadoc) {
62
- classifier = ' javadoc'
63
- from javadoc. destinationDir
64
- }
65
-
66
- task classesJar (type : Jar ) {
67
- from " $buildDir /intermediates/classes/release"
68
- }
69
-
70
- artifacts {
71
- archives classesJar
72
- archives javadocJar
73
- archives sourcesJar
44
+ implementation ' androidx.core:core-ktx:1.3.2'
45
+ implementation ' androidx.appcompat:appcompat:1.2.0'
46
+ implementation ' com.google.android.material:material:1.2.1'
47
+ }
48
+
49
+ afterEvaluate {
50
+ publishing {
51
+ publications {
52
+ // Creates a Maven publication called "release".
53
+ release(MavenPublication ) {
54
+ from components. release
55
+ groupId = ' com.github.jitpack'
56
+ artifactId = ' android-example'
57
+ version = ' 1.0'
58
+ }
59
+ }
60
+ }
74
61
}
0 commit comments