-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathandroid-release-aar.gradle
53 lines (47 loc) · 1.5 KB
/
android-release-aar.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// ./gradlew clean build generateRelease
apply plugin: 'maven'
def groupId = project.PUBLISH_GROUP_ID
def artifactId = project.PUBLISH_ARTIFACT_ID
def version = project.PUBLISH_VERSION
def releaseDest = project.PUBLISH_REPOSITORY
// copy javaDoc and sources to repository
//task androidJavadocs(type: Javadoc) {
// source = android.sourceSets.main.java.srcDirs
// 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.srcDirs
//}
//
//artifacts {
// archives androidSourcesJar
// archives androidJavadocsJar
//}
// END copy javaDoc and sources to repository
uploadArchives {
repositories.mavenDeployer {
pom.groupId = groupId
pom.artifactId = artifactId
pom.version = version
// Add other pom properties here if you want (developer details / licenses)
repository(url: releaseDest)
}
}
//task zipRelease(type: Zip) {
// from localReleaseDest
// destinationDir buildDir
// archiveName "release-${version}.zip"
//}
task generateRelease << {
println "Release ${version} can be found at ${releaseDest}/"
// println "Release ${version} zipped can be found ${buildDir}/release-${version}.zip"
}
generateRelease.dependsOn(uploadArchives)
//generateRelease.dependsOn(zipRelease)