diff --git a/app/build.gradle b/app/build.gradle index 4fccb6552..ecf270db0 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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' ])) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 982ef996d..e269f6577 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -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 diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 3013e40e6..cd5dd7617 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,16 +17,6 @@ - - - - - @@ -53,6 +43,7 @@ /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" \ diff --git a/mozilla-lint-rules/src/test/java/org/mozilla/fenix/lintrules/LicenseDetectorTest.kt b/mozilla-lint-rules/src/test/java/org/mozilla/fenix/lintrules/LicenseDetectorTest.kt index c05cda163..207445092 100644 --- a/mozilla-lint-rules/src/test/java/org/mozilla/fenix/lintrules/LicenseDetectorTest.kt +++ b/mozilla-lint-rules/src/test/java/org/mozilla/fenix/lintrules/LicenseDetectorTest.kt @@ -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) } -} +} \ No newline at end of file diff --git a/plugins/apksize/build.gradle b/plugins/apksize/build.gradle index 77b077a8b..ebc7ab538 100644 --- a/plugins/apksize/build.gradle +++ b/plugins/apksize/build.gradle @@ -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 { diff --git a/plugins/apksize/src/main/java/ApkSizePlugin.kt b/plugins/apksize/src/main/java/ApkSizePlugin.kt index d2dfc24ab..a327cee09 100644 --- a/plugins/apksize/src/main/java/ApkSizePlugin.kt +++ b/plugins/apksize/src/main/java/ApkSizePlugin.kt @@ -48,7 +48,7 @@ open class ApkSizeTask : DefaultTask() { } private fun determineApkSizes(): Map { - 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) diff --git a/plugins/fenixdependencies/build.gradle b/plugins/fenixdependencies/build.gradle index 7e8043a2a..32cea475d 100644 --- a/plugins/fenixdependencies/build.gradle +++ b/plugins/fenixdependencies/build.gradle @@ -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 {