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
6 changed files
with
122 additions
and
121 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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "gradle-maven-plugin"] | ||
path = gradle-maven-plugin | ||
url = https://github.com/sky-uk/gradle-maven-plugin/ |
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 was deleted.
Oops, something went wrong.
Submodule gradle-maven-plugin
added at
3ec7c8
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,56 @@ | ||
if (!rootProject.file('gradle-maven-plugin/gradle-mavenizer.gradle').exists()) { | ||
return | ||
} | ||
|
||
apply plugin: 'maven-publish' | ||
|
||
apply from: project.rootProject.file('gradle-maven-plugin/utils.gradle') | ||
apply from: project.rootProject.file('gradle-maven-plugin/artifact-javadoc-handler.gradle') | ||
apply from: project.rootProject.file('gradle-maven-plugin/artifact-pom-manager.gradle') | ||
|
||
project.afterEvaluate { | ||
publishing { | ||
publications { | ||
mavenPublish(MavenPublication) { | ||
if (isAndroidProject()) { | ||
artifact bundleReleaseAar | ||
artifact androidJavadocsJar | ||
artifact androidSourcesJar | ||
} else { | ||
artifact jar | ||
artifact sourcesJar | ||
artifact javadocJar | ||
} | ||
|
||
decoratePom(pom) | ||
} | ||
} | ||
|
||
repositories { | ||
def isToRemoteRepo = getBooleanProperty("mavPublishToRemoteRepo") | ||
def isToInternalRepo = getBooleanProperty("mavPublishToInternalRepo") | ||
def isToMavenLocal = getBooleanProperty("mavPublishToMavenLocal") | ||
|
||
if (isToRemoteRepo) { | ||
maven { | ||
credentials { | ||
username getStringProperty("mavRemoteRepoUser") | ||
password getStringProperty("mavRemoteRepoPassword") | ||
} | ||
url = getStringProperty("mavRepoRemoteUrl") | ||
} | ||
} | ||
|
||
if (isToInternalRepo) { | ||
maven { | ||
url = getStringProperty("mavRepoInternalUrl") | ||
} | ||
} | ||
|
||
if (isToMavenLocal || (!isToInternalRepo && !isToRemoteRepo)) { | ||
mavenLocal() | ||
} | ||
} | ||
} | ||
} | ||
|
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,46 @@ | ||
apply plugin: 'com.jfrog.bintray' | ||
|
||
project.ext { | ||
mavSiteUrl = 'https://github.com/RikkaApps/Shizuku' | ||
mavGitUrl = 'https://github.com/RikkaApps/Shizuku.git' | ||
mavLibraryLicenses = ["Apache-2.0": ''] | ||
mavPublishToMavenLocal = true | ||
bintrayRepo = 'Shizuku' | ||
} | ||
|
||
apply from: rootProject.file('gradle-mavenizer.gradle') | ||
|
||
project.afterEvaluate { | ||
def file = rootProject.file('local.properties') | ||
def props = new Properties() | ||
if (file.canRead()) { | ||
props.load(new FileInputStream(file)) | ||
|
||
if (props != null) { | ||
bintray.user = props["bintray.user"] | ||
bintray.key = props["bintray.apikey"] | ||
} | ||
} else { | ||
println '\'local.properties\' not found!' | ||
} | ||
|
||
bintray { | ||
publications = ['mavenPublish'] | ||
configurations = ['archives'] | ||
override = true | ||
pkg { | ||
repo = bintrayRepo | ||
name = mavProjectName | ||
desc = mavLibraryDescription | ||
publicDownloadNumbers = true | ||
publish = true | ||
licenses = ['Apache-2.0'] | ||
vcsUrl = mavSiteUrl | ||
version { | ||
name = this.version | ||
desc = "v${this.version}" | ||
released = new Date() | ||
} | ||
} | ||
} | ||
} |