New release script
This commit is contained in:
parent
0a106d5acb
commit
186c4f1d69
|
@ -6,9 +6,8 @@ buildscript {
|
|||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.5.3'
|
||||
classpath 'com.android.tools.build:gradle:3.6.3'
|
||||
|
||||
classpath 'digital.wup:android-maven-publish:3.6.3'
|
||||
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
|
|
@ -1,16 +1,39 @@
|
|||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'digital.wup.android-maven-publish'
|
||||
apply plugin: 'com.jfrog.bintray'
|
||||
|
||||
version = VERSION_NAME
|
||||
group = GROUP
|
||||
|
||||
task androidJavadocs(type: Javadoc) {
|
||||
source = android.sourceSets.main.java.srcDirs
|
||||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
||||
android.libraryVariants.all { variant ->
|
||||
if (variant.name == 'release') {
|
||||
owner.classpath += variant.javaCompileProvider.get().classpath
|
||||
}
|
||||
}
|
||||
exclude '**/R.html', '**/R.*.html', '**/index.html'
|
||||
}
|
||||
|
||||
task androidJavadocsJar(type: Jar, dependsOn: androidJavadocs) {
|
||||
archiveClassifier.set('javadoc')
|
||||
from androidJavadocs.destinationDir
|
||||
}
|
||||
|
||||
task androidSourcesJar(type: Jar) {
|
||||
archiveClassifier.set('sources')
|
||||
from android.sourceSets.main.java.srcDirs
|
||||
}
|
||||
|
||||
afterEvaluate { project ->
|
||||
publishing {
|
||||
publications {
|
||||
library(MavenPublication) {
|
||||
from components.android
|
||||
release(MavenPublication) {
|
||||
from components.release
|
||||
|
||||
artifact androidSourcesJar
|
||||
artifact androidJavadocsJar
|
||||
|
||||
groupId = GROUP
|
||||
artifactId = POM_ARTIFACT_ID
|
||||
version = VERSION_NAME
|
||||
|
@ -46,33 +69,6 @@ afterEvaluate { project ->
|
|||
}
|
||||
}
|
||||
|
||||
task javadoc(type: Javadoc) {
|
||||
failOnError false
|
||||
source = android.sourceSets.main.java.sourceFiles
|
||||
|
||||
title = POM_DESCRIPTION
|
||||
|
||||
options.links("https://docs.oracle.com/javase/8/docs/api/")
|
||||
options.linksOffline("https://d.android.com/reference","${android.sdkDirectory}/docs/reference")
|
||||
|
||||
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
||||
classpath += configurations.compile
|
||||
|
||||
// We're excluding these generated files
|
||||
exclude '**/BuildConfig.java'
|
||||
exclude '**/R.java'
|
||||
}
|
||||
|
||||
task androidJavadocsJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
task androidSourcesJar(type: Jar) {
|
||||
classifier = 'sources'
|
||||
from android.sourceSets.main.java.source
|
||||
}
|
||||
|
||||
if (JavaVersion.current().isJava8Compatible()) {
|
||||
allprojects {
|
||||
tasks.withType(Javadoc) {
|
||||
|
@ -80,11 +76,6 @@ afterEvaluate { project ->
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives androidSourcesJar
|
||||
archives androidJavadocsJar
|
||||
}
|
||||
}
|
||||
|
||||
// Bintray
|
||||
|
@ -95,7 +86,7 @@ bintray {
|
|||
user = properties.getProperty("BINTRAY_USER")
|
||||
key = properties.getProperty("BINTRAY_APIKEY")
|
||||
|
||||
publications = ['library']
|
||||
publications = ['release']
|
||||
|
||||
pkg {
|
||||
name = GROUP + ":" + POM_ARTIFACT_ID
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#Thu Nov 14 16:36:23 CET 2019
|
||||
#Wed May 13 14:15:38 CEST 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
|
||||
|
|
Loading…
Reference in New Issue