From 4cff039d78828487009e7832ed54125b181bbbab Mon Sep 17 00:00:00 2001 From: Ovidiu Viorel Iepure Date: Fri, 28 Oct 2016 07:55:33 -0700 Subject: [PATCH] Circle CI releases now work with Java 8 Reviewed By: bestander Differential Revision: D4095313 fbshipit-source-id: 1806db054bbca86f6394af077baeccac4e7efbe1 --- ReactAndroid/release.gradle | 11 +++++++++-- scripts/publish-npm.js | 14 -------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/ReactAndroid/release.gradle b/ReactAndroid/release.gradle index 32e8df591..51e431a98 100644 --- a/ReactAndroid/release.gradle +++ b/ReactAndroid/release.gradle @@ -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 diff --git a/scripts/publish-npm.js b/scripts/publish-npm.js index 3986a9924..c6c5ae876 100644 --- a/scripts/publish-npm.js +++ b/scripts/publish-npm.js @@ -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);