From 8ef0f1d90bbb2fa98e48ce89281718e5ac79365a Mon Sep 17 00:00:00 2001 From: Joshua Selbo Date: Tue, 19 May 2020 14:15:19 -0700 Subject: [PATCH] Fix thrown GradleScriptExceptions Summary: Changelog: [Android] [Fixed] Use actual constructor when throwing GradleScriptException Reviewed By: PeteTheHeat Differential Revision: D21644385 fbshipit-source-id: 09802682cb9eb788e508cff3fbebdbdacd5b1d69 --- ReactAndroid/build.gradle | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ReactAndroid/build.gradle b/ReactAndroid/build.gradle index 595bfafb74804f..c28a02dba7da41 100644 --- a/ReactAndroid/build.gradle +++ b/ReactAndroid/build.gradle @@ -98,12 +98,12 @@ task prepareFolly(dependsOn: dependenciesPath ? [] : [downloadFolly], type: Copy task prepareHermes() { def hermesPackagePath = findNodeModulePath(projectDir, "hermes-engine") if (!hermesPackagePath) { - throw new GradleScriptException("Could not find the hermes-engine npm package") + throw new GradleScriptException("Could not find the hermes-engine npm package", null) } def hermesAAR = file("$hermesPackagePath/android/hermes-debug.aar") if (!hermesAAR.exists()) { - throw new GradleScriptException("The hermes-engine npm package is missing \"android/hermes-debug.aar\"") + throw new GradleScriptException("The hermes-engine npm package is missing \"android/hermes-debug.aar\"", null) } def soFiles = zipTree(hermesAAR).matching({ it.include "**/*.so" }) @@ -165,12 +165,12 @@ task prepareJSC { doLast { def jscPackagePath = findNodeModulePath(projectDir, "jsc-android") if (!jscPackagePath) { - throw new GradleScriptException("Could not find the jsc-android npm package") + throw new GradleScriptException("Could not find the jsc-android npm package", null) } def jscDist = file("$jscPackagePath/dist") if (!jscDist.exists()) { - throw new GradleScriptException("The jsc-android npm package is missing its \"dist\" directory") + throw new GradleScriptException("The jsc-android npm package is missing its \"dist\" directory", null) } def jscAAR = fileTree(jscDist).matching({ it.include "**/android-jsc/**/*.aar" }).singleFile