Bug 1527796 - Part 4. Convert file separator to slash. r=nalexander
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Fri, 29 Mar 2019 16:04:06 +0900
changeset 466664 3f50c0fa29d8fdc07cb57d79fe971f4b6394d5c5
parent 466663 230ed445be2c2413cf3dff9a6db8e64eafda4ab4
child 466665 b698ba8b6e2454bd18dbe5b03fb98f8f6ff47df6
push id112593
push userm_kato@ga2.so-net.ne.jp
push dateFri, 29 Mar 2019 09:12:58 +0000
treeherdermozilla-inbound@6e20e4acf4e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1527796
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1527796 - Part 4. Convert file separator to slash. r=nalexander The file separator of Windows is backslash, not slash. So we have to convert it to slash if necessary. Differential Revision: https://phabricator.services.mozilla.com/D20453
mobile/android/app/build.gradle
mobile/android/gradle/with_gecko_binaries.gradle
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -27,17 +27,17 @@ android {
         targetSdkVersion project.ext.targetSdkVersion
         minSdkVersion project.ext.minSdkVersion
         manifestPlaceholders = project.ext.manifestPlaceholders
 
         applicationId mozconfig.substs.ANDROID_PACKAGE_NAME
         testApplicationId 'org.mozilla.roboexample.test'
         testInstrumentationRunner 'org.mozilla.gecko.FennecInstrumentationTestRunner'
         // Used by Robolectric based tests; see TestRunner.
-        buildConfigField 'String', 'BUILD_DIR', "\"${project.buildDir}\""
+        buildConfigField 'String', 'BUILD_DIR', "\"${project.buildDir}\"".tr(File.separator, "/")
 
         vectorDrawables.useSupportLibrary = true
         multiDexEnabled true
     }
 
     aaptOptions {
         // The omnijar is already a compressed file itself and Gecko expects it to be
         // STORED within the APK rather than DEFLATED.
--- a/mobile/android/gradle/with_gecko_binaries.gradle
+++ b/mobile/android/gradle/with_gecko_binaries.gradle
@@ -86,17 +86,17 @@ ext.configureLibraryVariantWithJNIWrappe
     //
     // It's not really possible to insert something immediately _after_
     // ...WithPrepareIntermediateJars..., so we make the consuming moz.build
     // system invoke this target directly, and force the
     // ...WithPrepareIntermediateJars... dependency.  The real consumer of the
     // JNI wrappers is the moz.build system, which always builds geckoview to
     // consume from Fennec, so that dependency likely adds less to the build time.
     def jarTask = tasks["transformClassesAndResourcesWithPrepareIntermediateJarsFor${variant.name.capitalize()}"]
-    def bundleJar = jarTask.outputs.files.find({ it.absolutePath.contains('/classes.jar') })
+    def bundleJar = jarTask.outputs.files.find({ it.name == 'classes.jar' })
 
     def annotationProcessorsJarTask = project(':annotations').jar
 
     def wrapperTask
     if (System.env.IS_LANGUAGE_REPACK == '1') {
         // Single-locale l10n repacks set `IS_LANGUAGE_REPACK=1` and don't
         // really have a build environment.
         wrapperTask = task("generateJNIWrappersFor${module}${variant.name.capitalize()}")
@@ -135,17 +135,17 @@ ext.configureLibraryVariantWithJNIWrappe
         tasks["bundle${variant.name.capitalize()}"].dependsOn wrapperTask
     } else {
         tasks["assemble${variant.name.capitalize()}"].dependsOn wrapperTask
     }
 }
 
 ext.configureApplicationVariantWithJNIWrappers = { variant, module ->
     def jarTask = tasks["bundleAppClasses${variant.name.capitalize()}"]
-    def bundleJar = jarTask.outputs.files.find({ it.absolutePath.contains('/classes.jar') })
+    def bundleJar = jarTask.outputs.files.find({ it.name == 'classes.jar' })
 
     def annotationProcessorsJarTask = project(':annotations').jar
 
     def wrapperTask
     if (System.env.IS_LANGUAGE_REPACK == '1') {
         // Single-locale l10n repacks set `IS_LANGUAGE_REPACK=1` and don't
         // really have a build environment.
         wrapperTask = task("generateJNIWrappersFor${module}${variant.name.capitalize()}")