@@ -29,31 +29,31 @@ def reactNativeInspectorProxyPort() {
29
29
}
30
30
31
31
def getHermesOSBin () {
32
- if (Os . isFamily(Os . FAMILY_WINDOWS )) return " win64-bin" ;
33
- if (Os . isFamily(Os . FAMILY_MAC )) return " osx-bin" ;
34
- if (Os . isOs(null , " linux" , " amd64" , null )) return " linux64-bin" ;
35
- throw new Exception (" OS not recognized. Please set project.ext.react.hermesCommand " +
36
- " to the path of a working Hermes compiler." );
32
+ if (Os . isFamily(Os . FAMILY_WINDOWS )) return " win64-bin" ;
33
+ if (Os . isFamily(Os . FAMILY_MAC )) return " osx-bin" ;
34
+ if (Os . isOs(null , " linux" , " amd64" , null )) return " linux64-bin" ;
35
+ throw new Exception (" OS not recognized. Please set project.ext.react.hermesCommand " +
36
+ " to the path of a working Hermes compiler." );
37
37
}
38
38
39
39
// Make sure not to inspect the Hermes config unless we need it,
40
40
// to avoid breaking any JSC-only setups.
41
41
def getHermesCommand = {
42
- // If the project specifies a Hermes command, don't second guess it.
43
- if (! hermesCommand. contains(" %OS-BIN%" )) {
44
- return hermesCommand
45
- }
42
+ // If the project specifies a Hermes command, don't second guess it.
43
+ if (! hermesCommand. contains(" %OS-BIN%" )) {
44
+ return hermesCommand
45
+ }
46
46
47
- // Execution on Windows fails with / as separator
48
- return hermesCommand
49
- .replaceAll(" %OS-BIN%" , getHermesOSBin())
50
- .replace(' /' as char , File . separatorChar);
47
+ // Execution on Windows fails with / as separator
48
+ return hermesCommand
49
+ .replaceAll(" %OS-BIN%" , getHermesOSBin())
50
+ .replace(' /' as char , File . separatorChar);
51
51
}
52
52
53
53
// Set enableHermesForVariant to a function to configure per variant,
54
54
// or set `enableHermes` to True/False to set all of them
55
55
def enableHermesForVariant = config. enableHermesForVariant ?: {
56
- def variant -> config. enableHermes ?: false
56
+ def variant -> config. enableHermes ?: false
57
57
}
58
58
59
59
android {
@@ -177,10 +177,10 @@ afterEvaluate {
177
177
}
178
178
179
179
enabled config. " bundleIn${ targetName} " != null
180
- ? config. " bundleIn${ targetName} "
181
- : config. " bundleIn${ variant.buildType.name.capitalize()} " != null
182
- ? config. " bundleIn${ variant.buildType.name.capitalize()} "
183
- : targetName. toLowerCase(). contains(" release" )
180
+ ? config. " bundleIn${ targetName} "
181
+ : config. " bundleIn${ variant.buildType.name.capitalize()} " != null
182
+ ? config. " bundleIn${ variant.buildType.name.capitalize()} "
183
+ : targetName. toLowerCase(). contains(" release" )
184
184
}
185
185
186
186
// Expose a minimal interface on the application variant and the task itself:
@@ -297,7 +297,7 @@ afterEvaluate {
297
297
def targetVariant = " .*/transforms/[^/]*/${ targetPath} /.*"
298
298
def path = details. file. getAbsolutePath(). replace(File . separatorChar, ' /' as char )
299
299
if (path. matches(targetVariant) && details. file. isFile()) {
300
- details. file. delete()
300
+ details. file. delete()
301
301
}
302
302
}
303
303
}
0 commit comments