-
Notifications
You must be signed in to change notification settings - Fork 41
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
7 changed files
with
110 additions
and
18 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
task androidJavadocs(type: Javadoc) { | ||
failOnError = false | ||
source = android.sourceSets.main.java.source | ||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) | ||
} | ||
|
||
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) { | ||
classifier = 'javadoc' | ||
from androidJavadocs.destinationDir | ||
} | ||
|
||
task androidSourcesJar(type: Jar) { | ||
classifier = 'sources' | ||
from android.sourceSets.main.java.source | ||
} | ||
|
||
bintray { | ||
dryRun = false | ||
publish = true | ||
override = true | ||
|
||
Properties properties = new Properties() | ||
|
||
def localPropsFile = project.rootProject.file('local.properties') | ||
if (localPropsFile.exists()) { | ||
properties.load(localPropsFile.newDataInputStream()) | ||
} | ||
|
||
user = properties.getProperty('bintrayUser') ?: System.getenv('BINTRAY_USER') | ||
key = properties.getProperty('bintrayKey') ?: System.getenv('BINTRAY_API_KEY') | ||
|
||
publications('release') | ||
|
||
pkg { | ||
repo = "MaterialDrawerKt" | ||
name = "MaterialDrawerKt" | ||
vcsUrl = "https://gitlab.com/zsmb/MaterialDrawerKt" | ||
|
||
publicDownloadNumbers = true | ||
licenses = ["Apache-2.0"] | ||
version { | ||
name = PUBLISH_VERSION | ||
vcsTag = PUBLISH_VERSION | ||
released = new Date() | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
release(MavenPublication) { | ||
groupId PUBLISH_GROUP_ID | ||
artifactId PUBLISH_ARTIFACT_ID | ||
version PUBLISH_VERSION | ||
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar") | ||
artifact androidSourcesJar | ||
artifact androidJavadocsJar | ||
|
||
pom.withXml { | ||
def dependenciesNode = asNode().appendNode('dependencies') | ||
|
||
project.configurations.implementation.allDependencies.each { | ||
def dependencyNode = dependenciesNode.appendNode('dependency') | ||
dependencyNode.appendNode('groupId', it.group) | ||
dependencyNode.appendNode('artifactId', it.name) | ||
dependencyNode.appendNode('version', it.version) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |