Bug 1821005 - Revert Gradle 8 upgrade due to startup crashes

Revert "Bug 1863744 - Update Gradle to version 8.4"

This reverts commit 829795632954148709fbe945c78d55cc62053ac8.

Revert "Bug 1821005 - Apply additional keep rules for missing classes detected while running R8."

This reverts commit 8f3f246cc5ff571323f56d46963d8d176bec91e3.

Revert "Bug 1821005 - Set UI_INJECTION_HOST mode for lint in test."

This reverts commit 6962bf0b5df57781045f68417f76527bcdf521ab.

Revert "Bug 1821005 -  Include sourcesJar as an input of publishing."

This reverts commit 41b2a48da577787c3189eec8c8af71c35cfecbfb.

Revert "Bug 1821005 - Set compileOptions for android subprojects."

This reverts commit fb21df9d0a9cd585e216733dc1bf929636df20f1.

Revert "Bug 1821005 - Replace deprecated project.buildDir"

This reverts commit 6f880de46ec73f7e5240a0279108bbb6aeb0f63b.

Revert "Bug 1821005 - Exclude generated metrics docs from detekt."

This reverts commit f17d2430bf1daabeed2724312354018050f3f52a.

Revert "Bug 1821005 - Exclude build in extensions versioning from detekt."

This reverts commit 34144c5ad1d62e2d85492f8d32341bbcd032690b.

Revert "Bug 1821005 - Add uses-feature tag for camera permission."

This reverts commit 13c80944bd1756cdcaa98eef783b6a23ad12cabd.

Revert "Bug 1821005 - Set nonTransitiveRClass and nonFinalResIds build flags to false."

This reverts commit 219fbc19c54134ad264edc79642fa1799c6f54d6.

Revert "Bug 1821005 - Apply plugin: 'kotlin-android' for UI modules."

This reverts commit ddbd5e18eb9d2b33b4de4a6df48d97ec4ab42963.

Revert "Bug 1821005 - Enable generation of the BuildConfig class"

This reverts commit 65c2b8c63790fbd2352f3f94b99c80d81d18dae1.

Revert "Bug 1821005 - Add namespace to samples-glean-library module"

This reverts commit 0239233efb1cc4e896e4aa0337e3da911eeb2f1c.

Revert "Bug 1821005 - Replace deprecated toLowerCase with lowercase."

This reverts commit 69f2c66aad3aa638a1bab31b2a1e6c597d1f3992.

Revert "Bug 1821005 - Replace deprecated 'toInt' method with 'code' property."

This reverts commit 7adb38a6fbe20de3fdb6723a10e574d183e7fcff.

Revert "Bug 1821005 - Replace deprecated execResult."

This reverts commit bfd02dd16d7e5c9dbcf34858fbbe4176d698f8cd.

Revert "Bug 1849833 - Replace deprecated extractNativeLibs manifest attribute."

This reverts commit a05bc9618457ab2d71a5d3d88d8d3b0318497a54.

Revert "Bug 1821005 - Upgrade AGP to 8.0.2"

This reverts commit fc0fadd63553e2144ce074454d502ecf307eb988.

Revert "Bug 1821005 - Upgrade kotlin-dsl to 4.1.0."

This reverts commit 14e8903e922fa22e28450520be3b6152be6a3a8f.

Revert "Bug 1821005 - Upgrade Gradle to 8.3 version."

This reverts commit f14f447a4d43588d24e4ca3efde0668ddcf7cf08.
fenix/121.0
Ryan VanderMeulen 6 months ago
parent 25f87b3149
commit e46a3545ae

@ -165,7 +165,6 @@ android {
buildFeatures {
viewBinding true
buildConfig true
}
androidResources {
@ -232,9 +231,6 @@ android {
excludes += ['META-INF/atomicfu.kotlin_module', 'META-INF/AL2.0', 'META-INF/LGPL2.1',
'META-INF/LICENSE.md', 'META-INF/LICENSE-notice.md']
}
jniLibs {
useLegacyPackaging true
}
}
@ -750,14 +746,14 @@ if (project.hasProperty("coverage")) {
def fileFilter = ['**/R.class', '**/R$*.class', '**/BuildConfig.*', '**/Manifest*.*',
'**/*Test*.*', 'android/**/*.*', '**/*$[0-9].*']
def kotlinDebugTree = fileTree(dir: "$project.layout.buildDirectory/tmp/kotlin-classes/${variant.name}", excludes: fileFilter)
def javaDebugTree = fileTree(dir: "$project.layout.buildDirectory/intermediates/classes/${variant.flavorName}/${variant.buildType.name}",
def kotlinDebugTree = fileTree(dir: "$project.buildDir/tmp/kotlin-classes/${variant.name}", excludes: fileFilter)
def javaDebugTree = fileTree(dir: "$project.buildDir/intermediates/classes/${variant.flavorName}/${variant.buildType.name}",
excludes: fileFilter)
def mainSrc = "$project.projectDir/src/main/java"
sourceDirectories.setFrom(files([mainSrc]))
classDirectories.setFrom(files([kotlinDebugTree, javaDebugTree]))
executionData.setFrom(fileTree(dir: project.layout.buildDirectory, includes: [
executionData.setFrom(fileTree(dir: project.buildDir, includes: [
"jacoco/test${variant.name.capitalize()}UnitTest.exec",
'outputs/code-coverage/connected/*coverage.ec'
]))

@ -124,9 +124,3 @@
# Keep Android Lifecycle methods
# https://bugzilla.mozilla.org/show_bug.cgi?id=1596302
-keep class androidx.lifecycle.** { *; }
-dontwarn java.beans.BeanInfo
-dontwarn java.beans.FeatureDescriptor
-dontwarn java.beans.IntrospectionException
-dontwarn java.beans.Introspector
-dontwarn java.beans.PropertyDescriptor

@ -17,16 +17,6 @@
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.CAMERA" />
<!-- This is needed because the android.permission.CAMERA above automatically
adds a requirements for camera hardware and we don't want add those restrictions -->
<uses-feature
android:name="android.hardware.camera"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.VIBRATE" />
@ -53,6 +43,7 @@
<application
android:name=".FenixApplication"
android:allowBackup="false"
android:extractNativeLibs="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"

@ -175,21 +175,8 @@ allprojects {
}
}
subprojects {
afterEvaluate {
if (it.hasProperty('android')) {
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
}
}
}
tasks.register('clean', Delete) {
delete rootProject.layout.buildDirectory
delete rootProject.buildDir
}
detekt {

@ -27,5 +27,3 @@ libUrl=https://github.com/mozilla-mobile/firefox-android/tree/main/fenix
libVcsUrl=https://github.com/mozilla-mobile/firefox-android.git
libLicense=MPL-2.0
libLicenseUrl=https://www.mozilla.org/en-US/MPL/2.0/
android.nonTransitiveRClass=false
android.nonFinalResIds=false

Binary file not shown.

@ -1,7 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

29
gradlew vendored

@ -83,8 +83,10 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@ -131,13 +133,10 @@ location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
@ -145,7 +144,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@ -153,7 +152,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@ -198,15 +197,11 @@ if "$cygwin" || "$msys" ; then
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \

@ -53,7 +53,6 @@ class LicenseDetectorTest : LintDetectorTest() {
lint()
.files(TestFiles.kt(code))
.allowMissingSdk(true)
.testModes(TestMode.UI_INJECTION_HOST)
.run()
.expect(expectedReport)
.expectFixDiffs(expectedFixOutput)
@ -152,4 +151,4 @@ class LicenseDetectorTest : LintDetectorTest() {
.expect(expectedReport)
.expectFixDiffs(expectedFixOutput)
}
}
}

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
plugins {
id "org.gradle.kotlin.kotlin-dsl" version "4.1.2"
id "org.gradle.kotlin.kotlin-dsl" version "2.4.1"
}
repositories {

@ -48,7 +48,7 @@ open class ApkSizeTask : DefaultTask() {
}
private fun determineApkSizes(): Map<String, Long> {
val variantOutputPath = variantName?.removePrefix("fenix")?.lowercase()
val variantOutputPath = variantName?.removePrefix("fenix")?.toLowerCase()
val basePath = listOf(
"${project.projectDir}", "build", "outputs", "apk", "fenix", variantOutputPath
).joinToString(File.separator)

@ -3,7 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
plugins {
id "org.gradle.kotlin.kotlin-dsl" version "4.1.2"
id "org.gradle.kotlin.kotlin-dsl" version "2.4.1"
}
repositories {

Loading…
Cancel
Save