Circle CI releases now work with Java 8
Reviewed By: bestander Differential Revision: D4095313 fbshipit-source-id: 1806db054bbca86f6394af077baeccac4e7efbe1
This commit is contained in:
parent
103257b793
commit
4cff039d78
|
@ -54,6 +54,14 @@ def configureReactNativePom(def pom) {
|
|||
}
|
||||
}
|
||||
|
||||
if (JavaVersion.current().isJava8Compatible()) {
|
||||
allprojects {
|
||||
tasks.withType(Javadoc) {
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate { project ->
|
||||
|
||||
task androidJavadoc(type: Javadoc) {
|
||||
|
@ -84,8 +92,7 @@ afterEvaluate { project ->
|
|||
|
||||
artifacts {
|
||||
archives androidSourcesJar
|
||||
// TODO Make Javadoc generation work with Java 1.8, currently only works with 1.7
|
||||
// archives androidJavadocJar
|
||||
archives androidJavadocJar
|
||||
}
|
||||
|
||||
version = VERSION_NAME
|
||||
|
|
|
@ -50,7 +50,6 @@
|
|||
require(`shelljs/global`);
|
||||
|
||||
const buildBranch = process.env.CIRCLE_BRANCH;
|
||||
const requiredJavaVersion = `1.7`;
|
||||
|
||||
let branchVersion;
|
||||
if (buildBranch.indexOf(`-stable`) !== -1) {
|
||||
|
@ -88,19 +87,6 @@ if (tagsWithVersion[0].indexOf(`-rc`) === -1) {
|
|||
}
|
||||
|
||||
// -------- Generating Android Artifacts with JavaDoc
|
||||
// Java -version outputs to stderr 0_o
|
||||
const javaVersion = exec(`java -version`).stderr;
|
||||
if (javaVersion.indexOf(requiredJavaVersion) === -1) {
|
||||
echo(`Java version must be 1.7.x in order to generate Javadoc. Check: java -version`);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// Uncomment Javadoc generation
|
||||
if (sed(`-i`, `// archives androidJavadocJar`, `archives androidJavadocJar`, `ReactAndroid/release.gradle`).code) {
|
||||
echo(`Couldn't enable Javadoc generation`);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (exec(`./gradlew :ReactAndroid:installArchives`).code) {
|
||||
echo(`Couldn't generate artifacts`);
|
||||
exit(1);
|
||||
|
|
Loading…
Reference in New Issue