-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from auth0/add-release-plugin
Add OSS Release plugin
- Loading branch information
Showing
7 changed files
with
29 additions
and
392 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Mon Dec 28 10:00:20 PST 2015 | ||
#Thu Apr 27 12:53:46 ART 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,32 @@ | ||
apply plugin: 'com.android.library' | ||
apply from: '../scripts/jacoco.gradle' | ||
apply from: '../scripts/release.gradle' | ||
apply plugin: 'com.auth0.gradle.oss-library.android' | ||
|
||
logger.lifecycle("Using version ${version} for ${name}") | ||
|
||
oss { | ||
library 'jwtdecode.android' | ||
name 'jwtdecode' | ||
repository 'jwtdecode.android' | ||
organization 'auth0' | ||
description 'JWT Decoding library for Android' | ||
|
||
developers { | ||
auth0 { | ||
displayName = 'Auth0' | ||
email = '[email protected]' | ||
} | ||
lbalmaceda { | ||
displayName = 'Luciano Balmaceda' | ||
email = '[email protected]' | ||
} | ||
} | ||
} | ||
|
||
android { | ||
compileSdkVersion 24 | ||
buildToolsVersion "24.0.3" | ||
compileSdkVersion 25 | ||
buildToolsVersion "25.0.3" | ||
defaultConfig { | ||
minSdkVersion 15 | ||
targetSdkVersion 24 | ||
targetSdkVersion 25 | ||
versionCode 1 | ||
versionName "1.0" | ||
} | ||
|
@@ -28,55 +41,9 @@ android { | |
dependencies { | ||
compile fileTree(dir: 'libs', include: ['*.jar']) | ||
compile 'com.google.code.gson:gson:2.7' | ||
compile 'com.android.support:appcompat-v7:24.2.1' | ||
compile 'com.android.support:appcompat-v7:25.3.1' | ||
testCompile 'junit:junit:4.12' | ||
testCompile 'org.hamcrest:java-hamcrest:2.0.0.0' | ||
testCompile 'org.robolectric:robolectric:3.1.4' | ||
testCompile 'org.mockito:mockito-core:2.2.5' | ||
} | ||
|
||
def defineVersion() { | ||
def current = describeGit(false) | ||
def snapshot = current == null | ||
if (snapshot) { | ||
current = describeGit(snapshot, "0.0.1") | ||
} | ||
return new Semver(snapshot: snapshot, version: current) | ||
} | ||
|
||
def describeGit(boolean snapshot, String defaultValue = null) { | ||
def arguments = ['describe', '--tags'] | ||
arguments.add(snapshot ? '--abbrev=0' : '--exact-match') | ||
def stdout = new ByteArrayOutputStream() | ||
def string = defaultValue | ||
try { | ||
def result = project.exec { | ||
executable = 'git' | ||
args = arguments | ||
standardOutput = stdout | ||
} | ||
|
||
result.assertNormalExitValue() | ||
|
||
if (stdout.toByteArray().length > 0) { | ||
string = stdout.toString().replace("\n", "") | ||
} | ||
} catch (Exception e) { | ||
logger.debug("Failed git describe command", e) | ||
} finally { | ||
stdout.close() | ||
} | ||
return string | ||
} | ||
|
||
class Semver { | ||
def version | ||
def snapshot | ||
|
||
def getStringVersion() { | ||
return snapshot ? version + "-SNAPSHOT" : version | ||
} | ||
} | ||
|
||
apply from: '../scripts/maven.gradle' | ||
apply from: '../scripts/bintray.gradle' | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.