Skip to content

Commit df02c0a

Browse files
author
Denis Miller
committed
Version 0.3.3 published to bintray: https://bintray.com/dmllr/maven/swipestack/0.3.3/
1 parent f3755cf commit df02c0a

File tree

3 files changed

+64
-30
lines changed

3 files changed

+64
-30
lines changed

build.gradle

+7-13
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,22 @@
22

33
buildscript {
44
repositories {
5+
google()
56
jcenter()
6-
maven {
7-
url 'https://maven.google.com/'
8-
name 'Google'
9-
}
107
}
118
dependencies {
129
classpath 'com.android.tools.build:gradle:3.0.1'
13-
classpath 'com.novoda:bintray-release:0.7.0'
1410
}
1511
}
1612

13+
plugins {
14+
id "com.github.dcendents.android-maven" version "2.0"
15+
id "com.jfrog.bintray" version "1.8.0"
16+
}
17+
1718
allprojects {
1819
repositories {
20+
google()
1921
jcenter()
20-
maven {
21-
url 'https://maven.google.com/'
22-
name 'Google'
23-
}
2422
}
2523
}
26-
27-
task clean(type: Delete) {
28-
delete rootProject.buildDir
29-
}

library/build.gradle

+4-17
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
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
62

73
android {
84
compileSdkVersion 27
@@ -11,8 +7,6 @@ android {
117
defaultConfig {
128
minSdkVersion 16
139
targetSdkVersion 27
14-
versionCode VERSION_CODE
15-
versionName VERSION_NAME
1610
}
1711
buildTypes {
1812
release {
@@ -23,16 +17,9 @@ android {
2317
}
2418

2519
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'
2923
}
3024

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'

library/publish.gradle

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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+
}

0 commit comments

Comments
 (0)