Skip to content

Commit 3ce02ff

Browse files
refactoring so it's pushed through bintray, pump version
1 parent ef6ea54 commit 3ce02ff

File tree

10 files changed

+225
-78
lines changed

10 files changed

+225
-78
lines changed

build.gradle

+8-21
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,24 @@ buildscript {
22
repositories {
33
mavenCentral()
44
jcenter()
5-
mavenLocal()
5+
maven {
6+
url 'https://dl.bintray.com/wwwadm-tv4/maven/'
7+
}
68
}
79

810
dependencies {
9-
classpath 'org.gradle.api.plugins:gradle-nexus-plugin:0.7'
10-
classpath 'com.android.tools.build:gradle:1.3.0'
11+
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
12+
classpath 'com.android.tools.build:gradle:1.5.0'
1113
classpath 'org.aspectj:aspectjtools:1.8.6'
1214
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
1315
}
1416
}
1517
allprojects {
1618
repositories {
1719
mavenCentral()
20+
maven {
21+
url 'https://dl.bintray.com/wwwadm-tv4/maven/'
22+
}
1823
}
1924

2025
group = GROUP
@@ -27,21 +32,3 @@ ext {
2732
buildToolsVersion = "23.0.1"
2833
}
2934

30-
31-
task cleanExample(type: Exec) {
32-
executable = '../gradlew'
33-
workingDir = project.file('app')
34-
args = ['clean']
35-
}
36-
37-
task assembleExample(type: Exec) {
38-
executable = '../gradlew'
39-
workingDir = project.file('app')
40-
args = ['assemble']
41-
}
42-
43-
task installExample(type: Exec) {
44-
executable = '../gradlew'
45-
workingDir = project.file('app')
46-
args = ['installDebug']
47-
}

chronometro-annotations/build.gradle

+59-21
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,72 @@
11
apply plugin: 'java'
2-
apply plugin: 'nexus'
2+
apply plugin: 'com.jfrog.bintray'
33

44
targetCompatibility = JavaVersion.VERSION_1_6
55
sourceCompatibility = JavaVersion.VERSION_1_6
66

7-
modifyPom {
8-
project {
9-
name "Chronometro Annotations"
10-
description POM_DESCRIPTION
11-
url POM_URL
127

13-
scm {
14-
url POM_SCM_URL
15-
connection POM_SCM_CONNECTION
16-
developerConnection POM_SCM_DEV_CONNECTION
17-
}
8+
Properties properties = new Properties()
9+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
10+
11+
bintray {
12+
user = properties.getProperty("bintray.user")
13+
key = properties.getProperty("bintray.apikey")
1814

19-
licenses {
20-
license {
21-
name POM_LICENCE_NAME
22-
url POM_LICENCE_URL
23-
distribution POM_LICENCE_DIST
15+
configurations = ['archives']
16+
pkg {
17+
repo = 'maven'
18+
name = 'Chronometro'
19+
20+
userOrg = user
21+
desc = POM_DESCRIPTION
22+
websiteUrl = POM_SCM_URL
23+
vcsUrl = POM_SCM_CONNECTION
24+
licenses = ["Apache-2.0"]
25+
publish = true
26+
publicDownloadNumbers = true
27+
version {
28+
desc = POM_DESCRIPTION
29+
gpg {
30+
sign = true //Determines whether to GPG sign the files. The default is false
31+
passphrase = properties.getProperty("bintray.gpg.password")
32+
//Optional. The passphrase for GPG signing'
2433
}
2534
}
35+
}
36+
}
2637

27-
developers {
28-
developer {
29-
id POM_DEVELOPER_ID
30-
name POM_DEVELOPER_NAME
38+
install {
39+
repositories.mavenInstaller {
40+
// This generates POM.xml with proper parameters
41+
pom.project {
42+
packaging 'pom'
43+
groupId GROUP
44+
artifactId 'chronometro-annotations'
45+
46+
// Add your description here
47+
name 'Chronometro'
48+
description POM_DESCRIPTION
49+
url POM_URL
50+
51+
// Set your license
52+
licenses {
53+
license {
54+
name POM_LICENCE_NAME
55+
url POM_LICENCE_URL
56+
}
57+
}
58+
developers {
59+
developer {
60+
id POM_DEVELOPER_ID
61+
name POM_DEVELOPER_NAME
62+
email POM_DEVELOPER_EMAIL
63+
}
64+
}
65+
scm {
66+
connection POM_SCM_CONNECTION
67+
developerConnection POM_SCM_DEV_CONNECTION
68+
url POM_SCM_URL
3169
}
3270
}
3371
}
34-
}
72+
}

chronometro-example/build.gradle

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ buildscript {
33
repositories {
44
mavenCentral()
55

6-
// NOTE: This is only needed when developing the plugin!
7-
mavenLocal()
6+
maven {
7+
url 'https://dl.bintray.com/wwwadm-tv4/maven/'
8+
}
89
}
910

10-
classpath 'com.android.tools.build:gradle:1.3.0'
11-
classpath 'se.tv4:chronometro-plugin:0.1.0'
11+
classpath 'com.android.tools.build:gradle:1.5.0'
12+
classpath 'se.tv4:chronometro-plugin:0.3.0'
13+
1214
}
1315
}
1416

@@ -19,8 +21,6 @@ dependencies {
1921
repositories {
2022
mavenCentral()
2123

22-
// NOTE: This is only needed when developing the plugin!
23-
mavenLocal()
2424
}
2525
}
2626

chronometro-example/src/main/AndroidManifest.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="se.tv4.chronometro">
4-
3+
package="se.tv4.chronometro.example">
4+
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="23" />
55
<application
66
android:allowBackup="true"
77
android:icon="@mipmap/ic_launcher"

chronometro-plugin/build.gradle

+59-22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
apply plugin: 'groovy'
2-
apply plugin: 'nexus'
2+
apply plugin: 'com.jfrog.bintray'
33

44

55
targetCompatibility = JavaVersion.VERSION_1_7
@@ -8,36 +8,73 @@ sourceCompatibility = JavaVersion.VERSION_1_7
88
dependencies {
99
compile gradleApi()
1010
compile localGroovy()
11-
compile 'com.android.tools.build:gradle:1.3.0'
11+
compile 'com.android.tools.build:gradle:1.5.0'
1212
compile 'org.aspectj:aspectjtools:1.8.6'
1313
compile 'org.aspectj:aspectjrt:1.8.6'
1414
}
1515

16-
modifyPom {
17-
project {
18-
name "Chronometro Plugin"
19-
description POM_DESCRIPTION
20-
url POM_URL
16+
Properties properties = new Properties()
17+
properties.load(project.rootProject.file('local.properties').newDataInputStream())
2118

22-
scm {
23-
url POM_SCM_URL
24-
connection POM_SCM_CONNECTION
25-
developerConnection POM_SCM_DEV_CONNECTION
26-
}
19+
bintray {
20+
user = properties.getProperty("bintray.user")
21+
key = properties.getProperty("bintray.apikey")
22+
23+
configurations = ['archives']
24+
pkg {
25+
repo = 'maven'
26+
name = 'Chronometro'
2727

28-
licenses {
29-
license {
30-
name POM_LICENCE_NAME
31-
url POM_LICENCE_URL
32-
distribution POM_LICENCE_DIST
28+
userOrg = user
29+
desc = POM_DESCRIPTION
30+
websiteUrl = POM_SCM_URL
31+
vcsUrl = POM_SCM_CONNECTION
32+
licenses = ["Apache-2.0"]
33+
publish = true
34+
publicDownloadNumbers = true
35+
version {
36+
desc = POM_DESCRIPTION
37+
gpg {
38+
sign = true //Determines whether to GPG sign the files. The default is false
39+
passphrase = properties.getProperty("bintray.gpg.password")
40+
//Optional. The passphrase for GPG signing'
3341
}
3442
}
43+
}
44+
}
45+
46+
install {
47+
repositories.mavenInstaller {
48+
// This generates POM.xml with proper parameters
49+
pom.project {
50+
packaging 'aar'
51+
groupId GROUP
52+
artifactId 'chronometro-plugin'
3553

36-
developers {
37-
developer {
38-
id POM_DEVELOPER_ID
39-
name POM_DEVELOPER_NAME
54+
// Add your description here
55+
name 'Chronometro'
56+
description POM_DESCRIPTION
57+
url POM_URL
58+
59+
// Set your license
60+
licenses {
61+
license {
62+
name POM_LICENCE_NAME
63+
url POM_LICENCE_URL
64+
}
65+
}
66+
developers {
67+
developer {
68+
id POM_DEVELOPER_ID
69+
name POM_DEVELOPER_NAME
70+
email POM_DEVELOPER_EMAIL
71+
}
72+
}
73+
scm {
74+
connection POM_SCM_CONNECTION
75+
developerConnection POM_SCM_DEV_CONNECTION
76+
url POM_SCM_URL
4077
}
4178
}
4279
}
43-
}
80+
}

chronometro-plugin/src/main/groovy/se/tv4/chronometro/plugin/ChronometroPlugin.groovy

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class chronometroPlugin implements Plugin<Project>
3434
}
3535

3636
project.dependencies {
37-
debugCompile 'se.tv4:chronometro-runtime:0.1.0'
37+
debugCompile 'se.tv4:chronometro-runtime:0.3.0'
3838
// TODO this should come transitively
3939
debugCompile 'org.aspectj:aspectjrt:1.8.6'
4040
}

0 commit comments

Comments
 (0)