File tree 3 files changed +64
-30
lines changed
3 files changed +64
-30
lines changed Original file line number Diff line number Diff line change 2
2
3
3
buildscript {
4
4
repositories {
5
+ google()
5
6
jcenter()
6
- maven {
7
- url ' https://maven.google.com/'
8
- name ' Google'
9
- }
10
7
}
11
8
dependencies {
12
9
classpath ' com.android.tools.build:gradle:3.0.1'
13
- classpath ' com.novoda:bintray-release:0.7.0'
14
10
}
15
11
}
16
12
13
+ plugins {
14
+ id " com.github.dcendents.android-maven" version " 2.0"
15
+ id " com.jfrog.bintray" version " 1.8.0"
16
+ }
17
+
17
18
allprojects {
18
19
repositories {
20
+ google()
19
21
jcenter()
20
- maven {
21
- url ' https://maven.google.com/'
22
- name ' Google'
23
- }
24
22
}
25
23
}
26
-
27
- task clean (type : Delete ) {
28
- delete rootProject. buildDir
29
- }
Original file line number Diff line number Diff line change 1
1
apply plugin : ' com.android.library'
2
- apply plugin : ' bintray-release'
3
-
4
- final String VERSION_NAME = " 0.3.0"
5
- final int VERSION_CODE = 30
6
2
7
3
android {
8
4
compileSdkVersion 27
@@ -11,8 +7,6 @@ android {
11
7
defaultConfig {
12
8
minSdkVersion 16
13
9
targetSdkVersion 27
14
- versionCode VERSION_CODE
15
- versionName VERSION_NAME
16
10
}
17
11
buildTypes {
18
12
release {
@@ -23,16 +17,9 @@ android {
23
17
}
24
18
25
19
dependencies {
26
- compile fileTree(dir : ' libs' , include : [' *.jar' ])
27
- testCompile ' junit:junit:4.12'
28
- compile ' com.android.support:appcompat-v7:27.0.2'
20
+ implementation fileTree(dir : ' libs' , include : [' *.jar' ])
21
+ testImplementation ' junit:junit:4.12'
22
+ implementation ' com.android.support:appcompat-v7:27.0.2'
29
23
}
30
24
31
- publish {
32
- userOrg = ' flschweiger'
33
- groupId = ' link.fls'
34
- artifactId = ' swipestack'
35
- publishVersion = VERSION_NAME
36
- desc = ' A swipeable view stack for Android.'
37
- website = ' https://github.com/flschweiger/SwipeStack'
38
- }
25
+ apply from : ' publish.gradle'
Original file line number Diff line number Diff line change
1
+ apply plugin : ' maven-publish'
2
+ apply plugin : ' com.jfrog.bintray'
3
+
4
+ version ' 0.3.3'
5
+ group ' oss.dmllr'
6
+
7
+ publishing {
8
+ publications {
9
+ release(MavenPublication ) {
10
+ artifact(" $buildDir /outputs/aar/library-release.aar" )
11
+ groupId
12
+ artifactId ' swipestack'
13
+ version this . version
14
+
15
+ pom. withXml {
16
+ def dependenciesNode = asNode(). appendNode(' dependencies' )
17
+
18
+ // Iterate over the implementation dependencies (we don't want the test ones), adding a <dependency> node for each
19
+ configurations. implementation. allDependencies. each {
20
+ // Ensure dependencies such as fileTree are not included in the pom.
21
+ if (it. name != ' unspecified' ) {
22
+ def dependencyNode = dependenciesNode. appendNode(' dependency' )
23
+ dependencyNode. appendNode(' groupId' , it. group)
24
+ dependencyNode. appendNode(' artifactId' , it. name)
25
+ dependencyNode. appendNode(' version' , it. version)
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
32
+
33
+ bintray {
34
+ println (project. hasProperty(' bintrayUser' ))
35
+ println (project. findProperty(' bintrayApiKey' ))
36
+ user = project. findProperty(' bintrayUser' )
37
+ key = project. findProperty(' bintrayApiKey' )
38
+ publications = [' release' ]
39
+ configurations = [' archives' ]
40
+ override = true
41
+ pkg {
42
+ repo = ' maven'
43
+ name = ' swipestack'
44
+ publish = true
45
+ publicDownloadNumbers = true
46
+ version {
47
+ name = this . version
48
+ desc = " A swipeable view stack for Android."
49
+ released = new Date ()
50
+ vcsTag = this . version
51
+ }
52
+ }
53
+ }
You can’t perform that action at this time.
0 commit comments