Skip to content

Commit 8ef0f1d

Browse files
Joshua Selbofacebook-github-bot
Joshua Selbo
authored andcommitted
Fix thrown GradleScriptExceptions
Summary: Changelog: [Android] [Fixed] Use actual constructor when throwing GradleScriptException Reviewed By: PeteTheHeat Differential Revision: D21644385 fbshipit-source-id: 09802682cb9eb788e508cff3fbebdbdacd5b1d69
1 parent afad239 commit 8ef0f1d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ReactAndroid/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ task prepareFolly(dependsOn: dependenciesPath ? [] : [downloadFolly], type: Copy
9898
task prepareHermes() {
9999
def hermesPackagePath = findNodeModulePath(projectDir, "hermes-engine")
100100
if (!hermesPackagePath) {
101-
throw new GradleScriptException("Could not find the hermes-engine npm package")
101+
throw new GradleScriptException("Could not find the hermes-engine npm package", null)
102102
}
103103

104104
def hermesAAR = file("$hermesPackagePath/android/hermes-debug.aar")
105105
if (!hermesAAR.exists()) {
106-
throw new GradleScriptException("The hermes-engine npm package is missing \"android/hermes-debug.aar\"")
106+
throw new GradleScriptException("The hermes-engine npm package is missing \"android/hermes-debug.aar\"", null)
107107
}
108108

109109
def soFiles = zipTree(hermesAAR).matching({ it.include "**/*.so" })
@@ -165,12 +165,12 @@ task prepareJSC {
165165
doLast {
166166
def jscPackagePath = findNodeModulePath(projectDir, "jsc-android")
167167
if (!jscPackagePath) {
168-
throw new GradleScriptException("Could not find the jsc-android npm package")
168+
throw new GradleScriptException("Could not find the jsc-android npm package", null)
169169
}
170170

171171
def jscDist = file("$jscPackagePath/dist")
172172
if (!jscDist.exists()) {
173-
throw new GradleScriptException("The jsc-android npm package is missing its \"dist\" directory")
173+
throw new GradleScriptException("The jsc-android npm package is missing its \"dist\" directory", null)
174174
}
175175

176176
def jscAAR = fileTree(jscDist).matching({ it.include "**/android-jsc/**/*.aar" }).singleFile

0 commit comments

Comments
 (0)