[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser-build/master] Bug 40106: Support using different geckoview series



commit 07262d2dbbbb645ba8f04ae94030276964b9a7bd
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
Date:   Wed Sep 30 11:42:34 2020 +0000

    Bug 40106: Support using different geckoview series
    
    We take the shortcut and just overwrite all the geckoview .aar files in
    our gradle-dependencies that are not breaking the build, which helps
    with fenix#40017, too.
---
 projects/android-components/build | 13 ++++++-------
 projects/fenix/build              | 12 +++++-------
 2 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/projects/android-components/build b/projects/android-components/build
index 3cac44a..43016b0 100644
--- a/projects/android-components/build
+++ b/projects/android-components/build
@@ -8,9 +8,13 @@ mkdir /var/tmp/build
 
 [% IF !c("var/fetch_gradle_dependencies") %]
   [% pc('python', 'var/setup', { python_tarfile => c('input_files_by_name/python') }) %]
-  # XXX: Make this more generic and not only for geckoview-beta.
-  geckoview_version=$(find . -type f -name geckoview-beta-*.aar | cut -d \- -f 6 | cut -d \. -f 1-3)
+  tar -C $distdir -xf [% c('input_files_by_name/geckoview') %]
   gradle_repo=$rootdir/[% c('input_files_by_name/gradle-dependencies') %]
+  # This overwrites the release and beta geckoview .aar files in our
+  # gradle-dependencies directory to be sure that only the one we provide is
+  # getting used when building beta/release code. XXX: Find a way to make that
+  # work for nightly, too.
+  find $gradle_repo -type f \( -name geckoview-[^a-z]*.aar -o -name geckoview-beta*.aar \) -exec cp -f $distdir/geckoview/geckoview*.aar {} \;
   cp -r $gradle_repo/dl/android/maven2/* $gradle_repo
   cp -r $gradle_repo/maven2/* $gradle_repo
   cp -r $gradle_repo/m2/* $gradle_repo
@@ -18,7 +22,6 @@ mkdir /var/tmp/build
   # XXX: We could be smarter and just copy over the projects that are needed
   # according to the Gradle dependencies list.
   cp -rf $distdir/application-services/maven/org $gradle_repo
-  tar -C $distdir -xf [% c('input_files_by_name/geckoview') %]
 [% END %]
 tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
 
@@ -38,10 +41,6 @@ patch -p1 < $rootdir/git.patch
   export LANG=C.UTF-8
   patch -p1 < $rootdir/mavenLocal.patch
 
-  # Make sure our GeckoView dependency is used. XXX: Make this more generic and
-  # not only for geckoview-beta.
-  cp -f $distdir/geckoview/*.aar $gradle_repo/org/mozilla/geckoview/geckoview-beta/$geckoview_version/geckoview-beta-$geckoview_version.aar
-
   gradle_args="--offline --no-daemon -Dmaven.repo.local=$gradle_repo"
 
   gradle $gradle_args assembleGeckoBeta -x lint
diff --git a/projects/fenix/build b/projects/fenix/build
index c9d7e22..0613b2f 100644
--- a/projects/fenix/build
+++ b/projects/fenix/build
@@ -12,9 +12,12 @@ EOF
 
 [% IF !c("var/fetch_gradle_dependencies") %]
   [% pc('python', 'var/setup', { python_tarfile => c('input_files_by_name/python') }) %]
-  # XXX: Make this more generic and not only for geckoview-beta.
-  geckoview_version=$(find . -type f -name geckoview-beta-*.aar | cut -d \- -f 6 | cut -d \. -f 1-3)
+  tar -C $distdir -xf [% c('input_files_by_name/geckoview') %]
   gradle_repo=$rootdir/[% c('input_files_by_name/gradle-dependencies') %]
+  # This overwrites the release, beta, and nightly geckoview .aar files in our
+  # gradle-dependencies directory to be sure that only the one we provide is
+  # getting used when building beta/release code.
+  find $gradle_repo -type f -name geckoview*.aar -exec cp -f $distdir/geckoview/geckoview*.aar {} \;
   cp -r $gradle_repo/dl/android/maven2/* $gradle_repo
   cp -r $gradle_repo/maven2/* $gradle_repo
   cp -r $gradle_repo/m2/* $gradle_repo
@@ -24,7 +27,6 @@ EOF
   cp -rf $distdir/application-services/maven/org $gradle_repo
   tar -C $distdir -xf [% c('input_files_by_name/android-components') %]
   cp -rf $distdir/android-components/maven/org $gradle_repo
-  tar -C $distdir -xf [% c('input_files_by_name/geckoview') %]
 [% END %]
 tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.gz
 
@@ -45,10 +47,6 @@ cp $rootdir/[% c('input_files_by_name/tor-android-service') %]/* app/
   export LANG=C.UTF-8
   patch -p1 < $rootdir/mavenLocal.patch
 
-  # Make sure our GeckoView dependency is used. XXX: Make this more generic and
-  # not only for geckoview-beta.
-  cp -f $distdir/geckoview/*.aar $gradle_repo/org/mozilla/geckoview/geckoview-beta/$geckoview_version/geckoview-beta-$geckoview_version.aar
-
   eval $(perl $rootdir/get-moz-build-date [% c("var/copyright_year") %] [% c("var/torbrowser_version") %])
   if [ -z $MOZ_BUILD_DATE ]
   then

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits