Skip to content

Commit 713854a

Browse files
authored
Merge pull request #11 from auth0/add-release-plugin
Add OSS Release plugin
2 parents 8ed3908 + 7a6f0bf commit 713854a

File tree

7 files changed

+29
-392
lines changed

7 files changed

+29
-392
lines changed

build.gradle

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
buildscript {
44
repositories {
55
jcenter()
6+
maven {
7+
url "https://plugins.gradle.org/m2/"
8+
}
69
}
710
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.2.2'
11+
classpath 'com.android.tools.build:gradle:2.3.1'
12+
classpath 'com.dicedmelon.gradle:jacoco-android:0.1.1'
913
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7'
10-
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
14+
classpath 'gradle.plugin.com.auth0.gradle:oss-library:0.6.0'
1115
}
1216
}
1317

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Dec 28 10:00:20 PST 2015
1+
#Thu Apr 27 12:53:46 ART 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

lib/build.gradle

Lines changed: 21 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,32 @@
11
apply plugin: 'com.android.library'
2-
apply from: '../scripts/jacoco.gradle'
3-
apply from: '../scripts/release.gradle'
2+
apply plugin: 'com.auth0.gradle.oss-library.android'
43

54
logger.lifecycle("Using version ${version} for ${name}")
65

76
oss {
8-
library 'jwtdecode.android'
7+
name 'jwtdecode'
8+
repository 'jwtdecode.android'
9+
organization 'auth0'
10+
description 'JWT Decoding library for Android'
11+
12+
developers {
13+
auth0 {
14+
displayName = 'Auth0'
15+
16+
}
17+
lbalmaceda {
18+
displayName = 'Luciano Balmaceda'
19+
20+
}
21+
}
922
}
1023

1124
android {
12-
compileSdkVersion 24
13-
buildToolsVersion "24.0.3"
25+
compileSdkVersion 25
26+
buildToolsVersion "25.0.3"
1427
defaultConfig {
1528
minSdkVersion 15
16-
targetSdkVersion 24
29+
targetSdkVersion 25
1730
versionCode 1
1831
versionName "1.0"
1932
}
@@ -28,55 +41,9 @@ android {
2841
dependencies {
2942
compile fileTree(dir: 'libs', include: ['*.jar'])
3043
compile 'com.google.code.gson:gson:2.7'
31-
compile 'com.android.support:appcompat-v7:24.2.1'
44+
compile 'com.android.support:appcompat-v7:25.3.1'
3245
testCompile 'junit:junit:4.12'
3346
testCompile 'org.hamcrest:java-hamcrest:2.0.0.0'
3447
testCompile 'org.robolectric:robolectric:3.1.4'
3548
testCompile 'org.mockito:mockito-core:2.2.5'
36-
}
37-
38-
def defineVersion() {
39-
def current = describeGit(false)
40-
def snapshot = current == null
41-
if (snapshot) {
42-
current = describeGit(snapshot, "0.0.1")
43-
}
44-
return new Semver(snapshot: snapshot, version: current)
45-
}
46-
47-
def describeGit(boolean snapshot, String defaultValue = null) {
48-
def arguments = ['describe', '--tags']
49-
arguments.add(snapshot ? '--abbrev=0' : '--exact-match')
50-
def stdout = new ByteArrayOutputStream()
51-
def string = defaultValue
52-
try {
53-
def result = project.exec {
54-
executable = 'git'
55-
args = arguments
56-
standardOutput = stdout
57-
}
58-
59-
result.assertNormalExitValue()
60-
61-
if (stdout.toByteArray().length > 0) {
62-
string = stdout.toString().replace("\n", "")
63-
}
64-
} catch (Exception e) {
65-
logger.debug("Failed git describe command", e)
66-
} finally {
67-
stdout.close()
68-
}
69-
return string
70-
}
71-
72-
class Semver {
73-
def version
74-
def snapshot
75-
76-
def getStringVersion() {
77-
return snapshot ? version + "-SNAPSHOT" : version
78-
}
79-
}
80-
81-
apply from: '../scripts/maven.gradle'
82-
apply from: '../scripts/bintray.gradle'
49+
}

scripts/bintray.gradle

Lines changed: 0 additions & 32 deletions
This file was deleted.

scripts/jacoco.gradle

Lines changed: 0 additions & 56 deletions
This file was deleted.

scripts/maven.gradle

Lines changed: 0 additions & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)