GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Unverified Commit 5a4eb7fb authored by Georg Koppen's avatar Georg Koppen
Browse files

Bug 33927: Add fenix

parent a3a5306f
#!/bin/bash
[% c("var/set_default_env") -%]
[% pc(c('var/compiler'), 'var/setup', { compiler_tarfile => c('input_files_by_name/' _ c('var/compiler')) }) %]
distdir=/var/tmp/dist
builddir=/var/tmp/build/[% project %]
mkdir -p $distdir/[% project %]
mkdir -p /var/tmp/build
[% IF !c("var/fetch_gradle_dependencies") %]
# 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)
gradle_repo=$rootdir/[% c('input_files_by_name/gradle-dependencies') %]
cp -r $gradle_repo/dl/android/maven2/* $gradle_repo
cp -r $gradle_repo/maven2/* $gradle_repo
cp -r $gradle_repo/m2/* $gradle_repo
tar -C $distdir -xf [% c('input_files_by_name/application-services') %]
# XXX: We could be smarter (both for a-s and a-c) 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/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
cd $builddir-[% c("version") %]
[% IF c("var/fetch_gradle_dependencies") %]
gradle --debug --no-daemon app:assemble[% c('build_flavor') %] -x lint
[% ELSE %]
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 --offline --no-daemon -Dmaven.repo.local=$gradle_repo app:assemble[% c('build_flavor') %] -x lint
# We have both the Gecko and the Fenix type in upper camel case. But the path to
# the .apks is in lower camel case.
gf=[% c("gecko_flavor") %]
ff=[% c("fenix_flavor") %]
cp app/build/outputs/apk/${gf,}/${ff,}/*.apk $distdir/[% project %]
cd $distdir
[% c('tar', {
tar_src => [ project ],
tar_args => '-czf ' _ dest_dir _ '/' _ c('filename'),
}) %]
[% END %]
# vim: filetype=yaml sw=2
version: 10.0a6
filename: 'fenix-[% c("version") %]-[% c("var/build_id") %].tar.gz'
git_hash: 'tor-browser-[% c("var/fenix_version") %]-[% c("var/torbrowser_branch") %]-1-build1'
git_url: https://gitlab.torproject.org/tpo/applications/fenix.git
tag_gpg_id: 1
gpg_keyring: torbutton.gpg
gecko_flavor: 'GeckoBeta'
fenix_flavor: 'FennecProduction'
build_flavor: '[% c("gecko_flavor") %][% c("fenix_flavor") %]'
var:
fenix_version: '80.0b[% c("var/beta_version") %]'
beta_version: 6
torbrowser_branch: 10
container:
use_container: 1
# This should be updated when the list of gradle dependencies is changed.
gradle_dependencies_version: 1
# Switch to make it easier to grab all dependencies during a dry-run.
fetch_gradle_dependencies: 0
targets:
nightly:
git_hash: 'tor-browser-[% c("var/fenix_version") %]-[% c("var/torbrowser_branch") %]-1'
tag_gpg_id: 0
version: '[% c("abbrev") %]'
fenix_flavor: 'Debug'
input_files:
- project: container-image
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
- name: android-components
project: android-components
enable: '[% !c("var/fetch_gradle_dependencies") %]'
- name: application-services
project: application-services
enable: '[% !c("var/fetch_gradle_dependencies") %]'
- name: geckoview
project: geckoview
pkg_type: merge_aars
enable: '[% !c("var/fetch_gradle_dependencies") %]'
- filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]'
name: gradle-dependencies
enable: '[% !c("var/fetch_gradle_dependencies") %]'
exec: '[% INCLUDE "fetch-gradle-dependencies" %]'
- filename: mavenLocal.patch
enable: '[% !c("var/fetch_gradle_dependencies") %]'
This diff is collapsed.
From e4dea681f8b458415dc19343c1a5298d5268ae34 Mon Sep 17 00:00:00 2001
From: Georg Koppen <gk@torproject.org>
Date: Tue, 21 Apr 2020 11:03:13 +0000
Subject: [PATCH] Bug 33927: Use local maven repository for gradle dependencies
diff --git a/build.gradle b/build.gradle
index 9f00fff0f..e503efbf2 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,6 +5,7 @@ import org.mozilla.fenix.gradle.tasks.GithubDetailsTask
buildscript {
// This logic is duplicated in the allprojects block: I don't know how to fix that.
repositories {
+ mavenLocal()
maven {
name "Mozilla Nightly"
url "https://nightly.maven.mozilla.org/maven2"
@@ -78,6 +79,7 @@ plugins {
allprojects {
// This logic is duplicated in the buildscript block: I don't know how to fix that.
repositories {
+ mavenLocal()
maven {
name "Mozilla Nightly"
url "https://nightly.maven.mozilla.org/maven2"
diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
index 508a8d43d..a402f4767 100644
--- a/buildSrc/build.gradle
+++ b/buildSrc/build.gradle
@@ -1,11 +1,11 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
plugins {
id "org.gradle.kotlin.kotlin-dsl" version "1.3.6"
}
repositories {
+ mavenLocal()
jcenter()
}
diff --git a/buildSrc/settings.gradle b/buildSrc/settings.gradle
new file mode 100644
index 000000000..a7066edcb
--- /dev/null
+++ b/buildSrc/settings.gradle
@@ -0,0 +1,5 @@
+pluginManagement {
+ repositories {
+ mavenLocal()
+ }
+}
diff --git a/settings.gradle b/settings.gradle
index 8440fc306..d2e8ba475 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,3 +1,9 @@
+pluginManagement {
+ repositories {
+ mavenLocal()
+ }
+}
+
include ':app'
include ':mozilla-detekt-rules'
--
2.28.0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment