-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
209 additions
and
88 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,3 @@ classes | |
/.idea/libraries | ||
.DS_Store | ||
/build | ||
/gradle.properties | ||
bintray_push.gradle | ||
maven_push.gradle |
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
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Empty properties to keep the build portable. | ||
# Don't fill these with real values - override them in ~/.gradle | ||
# or on the command line. | ||
|
||
kotlin.code.style=official |
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 |
---|---|---|
@@ -0,0 +1,116 @@ | ||
project.description = "Generate Android version code and version name automatically from git tags, date,... ." | ||
project.group = "me.moallemi.gradle" | ||
project.version = "1.7.0-SNAPSHOT" | ||
project.ext { | ||
artifactId = 'advanced-build-version' | ||
name = 'Gradle Advanced Build Version Plugin' | ||
url = "https://github.com/moallemi/gradle-advanced-build-version" | ||
scm = [ | ||
connectionUrl : "scm:[email protected]:moallemi/gradle-advanced-build-version.git", | ||
developerConnectionUrl: "scm:[email protected]:moallemi/gradle-advanced-build-version.git" | ||
] | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
from sourceSets.main.allSource | ||
archiveClassifier.set("sources") | ||
} | ||
|
||
task javadocJar(type: Jar) { | ||
from tasks.javadoc | ||
archiveClassifier.set("javadoc") | ||
} | ||
|
||
publishing { | ||
publications { | ||
advancedBuildVersion(MavenPublication) { | ||
groupId = project.group | ||
artifactId = project.artifactId | ||
version = project.version | ||
|
||
from components.java | ||
artifact tasks["sourcesJar"] | ||
artifact tasks["javadocJar"] | ||
|
||
pom { | ||
name = project.name | ||
packaging "jar" | ||
description = project.description | ||
url = project.url | ||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'moallemi' | ||
name = 'Reza Moallemi' | ||
} | ||
} | ||
scm { | ||
url = project.url | ||
connection = project.scm.connectionUrl | ||
developerConnection = project.scm.developerConnectionUrl | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2" | ||
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots" | ||
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl | ||
credentials { | ||
username System.getenv('SONATYPE_USERNAME') | ||
password System.getenv('SONATYPE_PASSWORD') | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
required !version.endsWith('SNAPSHOT') | ||
useInMemoryPgpKeys(System.getenv('SIGNING_KEY'), System.getenv('SIGNING_PASSWORD')) | ||
sign(publishing.publications["advancedBuildVersion"]) | ||
} | ||
|
||
bintray { | ||
user = System.getenv('BINTRAY_USERNAME') | ||
key = System.getenv('BINTRAY_API_KEY') | ||
publications = ['advancedBuildVersion'] | ||
dryRun = false | ||
pkg { | ||
repo = 'maven' | ||
name = project.artifactId | ||
desc = project.description | ||
websiteUrl = project.url | ||
issueTrackerUrl = 'https://github.com/moallemi/gradle-advanced-build-version/issues' | ||
vcsUrl = 'https://github.com/moallemi/gradle-advanced-build-version.git' | ||
licenses = ['Apache-2.0'] | ||
labels = ['kotlin', 'android', 'gradle', 'advanced-build-version', 'versionCode', 'versionName'] | ||
publicDownloadNumbers = false | ||
githubRepo = 'moallemi/gradle-advanced-build-version' //Optional Github repository | ||
githubReleaseNotesFile = 'README.md' //Optional Github readme file | ||
version { | ||
name = project.version | ||
//desc = 'optional, version-specific description' | ||
//released = 'optional, date of the version release' //2 possible values: date in the format of 'yyyy-MM-dd'T'HH:mm:ss.SSSZZ' OR a java.util.Date instance | ||
//vcsTag = '1.3.0' | ||
// attributes = [] //Optional version-level attributes | ||
gpg { | ||
sign = true //Determines whether to GPG sign the files. The default is false | ||
passphrase = System.getenv('BINTRAY_SIGNING_PASSWORD') //Optional. The passphrase for GPG signing' | ||
} | ||
mavenCentralSync { | ||
sync = false //Optional (true by default). Determines whether to sync the version to Maven Central. | ||
user = System.getenv('SONATYPE_USERNAME') //OSS user token | ||
password = System.getenv('SONATYPE_PASSWORD') //OSS user password | ||
close = '1' | ||
//Optional property. By default the staging repository is closed and artifacts are released to Maven Central. You can optionally turn this behaviour off (by puting 0 as value) and release the version manually. | ||
} | ||
} | ||
} | ||
|
||
} |
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
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
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
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
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
Oops, something went wrong.