Skip to content

Commit

Permalink
Merge branch 'bump-dependencies'
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa committed Sep 17, 2024
2 parents eebf21c + bb90917 commit 9a8c583
Show file tree
Hide file tree
Showing 15 changed files with 1,264 additions and 1,303 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/android-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ jobs:
- name: Fix git dir
run: git config --global --add safe.directory $(pwd)

- name: Copy maybenot machines to asset directory
run: |
mkdir -p android/app/build/extraAssets
cp dist-assets/maybenot_machines android/app/build/extraAssets/maybenot_machines
- name: Re-generate lockfile
run: android/scripts/update-lockfile.sh

Expand Down
30 changes: 13 additions & 17 deletions android/app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
import com.android.build.gradle.internal.lint.LintModelWriterTask
import com.android.build.gradle.internal.tasks.factory.dependsOn
import com.android.build.gradle.tasks.MergeSourceSetFolders
import java.io.FileInputStream
import java.util.Properties
import org.gradle.configurationcache.extensions.capitalized
Expand All @@ -18,11 +16,11 @@ plugins {
}

val repoRootPath = rootProject.projectDir.absoluteFile.parentFile.absolutePath
val extraAssetsDirectory = "${project.buildDir}/extraAssets"
val relayListPath = "$extraAssetsDirectory/relays.json"
val maybenotMachinesDirectory = "$extraAssetsDirectory/maybenot_machines"
val extraAssetsDirectory = layout.buildDirectory.dir("extraAssets").get()
val relayListPath = extraAssetsDirectory.file("relays.json").asFile
val maybenotMachinesFile = extraAssetsDirectory.file("maybenot_machines").asFile
val defaultChangelogAssetsDirectory = "$repoRootPath/android/src/main/play/release-notes/"
val extraJniDirectory = "${project.buildDir}/extraJni"
val extraJniDirectory = layout.buildDirectory.dir("extraJni").get()

val credentialsPath = "${rootProject.projectDir}/credentials"
val keystorePropertiesFile = file("$credentialsPath/keystore.properties")
Expand Down Expand Up @@ -77,7 +75,7 @@ android {
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
"proguard-rules.pro",
)
}
create(BuildTypes.FDROID) {
Expand Down Expand Up @@ -144,7 +142,7 @@ android {
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
"-opt-in=kotlinx.coroutines.ObsoleteCoroutinesApi",
// Opt-in option for Koin annotation of KoinComponent.
"-opt-in=kotlin.RequiresOptIn"
"-opt-in=kotlin.RequiresOptIn",
)
}

Expand Down Expand Up @@ -174,7 +172,7 @@ android {
"META-INF/LICENSE.md",
"META-INF/LICENSE-notice.md",
"META-INF/io.netty.versions.properties",
"META-INF/INDEX.LIST"
"META-INF/INDEX.LIST",
)
}
}
Expand All @@ -193,7 +191,7 @@ android {
buildConfigField(
"boolean",
"ENABLE_IN_APP_VERSION_NOTIFICATIONS",
enableInAppVersionNotifications
enableInAppVersionNotifications,
)
}

Expand Down Expand Up @@ -229,7 +227,7 @@ android {

val createDistBundle =
tasks.register<Copy>("create${capitalizedVariantName}DistBundle") {
from("$buildDir/outputs/bundle/$variantName")
from("${layout.buildDirectory}/outputs/bundle/$variantName")
into("${rootDir.parent}/dist")
include { it.name.endsWith(".aab") }
rename { "$artifactName.aab" }
Expand All @@ -254,8 +252,6 @@ junitPlatform {
}
}

composeCompiler { enableStrongSkippingMode = true }

androidComponents {
beforeVariants { variantBuilder ->
variantBuilder.enable =
Expand All @@ -279,23 +275,23 @@ configure<org.owasp.dependencycheck.gradle.extension.DependencyCheckExtension> {

tasks.register("ensureRelayListExist") {
doLast {
if (!file(relayListPath).exists()) {
if (!relayListPath.exists()) {
throw GradleException("Missing relay list: $relayListPath")
}
}
}

tasks.register("ensureMaybenotMachinesExist") {
doLast {
if (!file(maybenotMachinesDirectory).exists()) {
throw GradleException("Missing maybenot machines: $maybenotMachinesDirectory")
if (!maybenotMachinesFile.exists()) {
throw GradleException("Missing maybenot machines: $maybenotMachinesFile")
}
}
}

tasks.register("ensureJniDirectoryExist") {
doLast {
if (!file(extraJniDirectory).exists()) {
if (!extraJniDirectory.asFile.exists()) {
throw GradleException("Missing JNI directory: $extraJniDirectory")
}
}
Expand Down
11 changes: 4 additions & 7 deletions android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ buildscript {
gradlePluginPortal()
}
dependencies {
// Dependency class paths are required for Gradle metadata verification to work properly, see:
// Dependency class paths are required for Gradle metadata verification to work properly,
// see:
// https://github.com/gradle/gradle/issues/19228s
//noinspection UseTomlInstead
val aapt = libs.android.gradle.aapt.get().toString()
Expand Down Expand Up @@ -74,11 +75,7 @@ val baselineFile = file("$rootDir/config/baseline.xml")
val configFile = files("$rootDir/config/detekt.yml")

val projectSource = file(projectDir)
val detektExcludedPaths =
listOf(
"**/build/**",
"**/mullvad_daemon/management_interface/**",
)
val detektExcludedPaths = listOf("**/build/**", "**/mullvad_daemon/management_interface/**")

detekt {
buildUponDefaultConfig = true
Expand Down Expand Up @@ -127,4 +124,4 @@ tasks.withType<DependencyUpdatesTask> {
rejectVersionIf { candidate.version.isNonStableVersion() }
}

tasks.register("clean", Delete::class) { delete(rootProject.buildDir) }
tasks.register("clean", Delete::class) { delete(rootProject.layout.buildDirectory) }
10 changes: 1 addition & 9 deletions android/config/dependency-check-suppression.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<packageUrl regex="true">^pkg:maven/org\.jetbrains\.kotlin/kotlin\-stdlib.*@.*$</packageUrl>
<cve>CVE-2022-24329</cve>
</suppress>
<suppress until="2024-09-01Z">
<suppress until="2024-12-01Z">
<notes><![CDATA[
This CVE only affect programs using loadXML and is derived from using ksp.
We do not use the loadXML, ksp is used to generate navigation paths in our code
Expand All @@ -17,14 +17,6 @@
<packageUrl regex="true">^pkg:maven/com\.google\.devtools\.ksp/symbol\-processing.*@.*$</packageUrl>
<cve>CVE-2018-1000840</cve>
</suppress>
<suppress until="2024-09-01Z">
<notes><![CDATA[
False-positive related to Drupal rather than Android development.
https://nvd.nist.gov/vuln/detail/CVE-2014-9152
]]></notes>
<packageUrl regex="true">^pkg:maven/androidx\.test\.services/storage@.*$</packageUrl>
<cve>CVE-2014-9152</cve>
</suppress>
<suppress until="2024-12-01Z">
<notes><![CDATA[
False-positive only affecting javascript gRPC packages.
Expand Down
34 changes: 17 additions & 17 deletions android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
# https://github.com/gradle/gradle/issues/19228
android-gradle-plugin = "8.3.0"
android-gradle-aapt = "10880808"
android-billingclient = "6.2.0"
android-billingclient = "7.0.0"
android-volley = "1.2.1"

# AndroidX
androidx-activitycompose = "1.9.1"
androidx-activitycompose = "1.9.2"
androidx-appcompat = "1.7.0"
androidx-ktx = "1.13.1"
androidx-coresplashscreen = "1.1.0-rc01"
androidx-espresso = "3.6.1"
androidx-lifecycle = "2.8.4"
androidx-lifecycle = "2.8.5"
androidx-test = "1.6.1"
androidx-testmonitor = "1.7.1"
androidx-testorchestrator = "1.5.0"
Expand All @@ -25,15 +25,15 @@ androidx-uiautomator = "2.4.0-alpha01"
arrow = "1.2.4"

# Compose
compose = "1.7.0-beta06"
compose-destinations = "2.1.0-beta10"
compose = "1.7.1"
compose-destinations = "2.1.0-beta12"
compose-constraintlayout = "1.0.1"
compose-material3 = "1.3.0-beta04"
compose-material3 = "1.3.0"

grpc = "1.65.1"
grpc = "1.66.0"
grpc-kotlin = "1.4.1"
grpc-kotlin-jar = "1.4.1:jdk8@jar"
grpc-protobuf = "4.27.2"
grpc-protobuf = "4.28.1"

# Koin
koin = "3.5.6"
Expand All @@ -42,26 +42,26 @@ koin-compose = "3.5.6"
# Kotlin
# Bump kotlin and kotlin-ksp together, find matching release here:
# https://github.com/google/ksp/releases
kotlin = "2.0.0"
kotlin-ksp = "2.0.0-1.0.22"
kotlinx = "1.8.1"
kotlin = "2.0.20"
kotlin-ksp = "2.0.20-1.0.25"
kotlinx = "1.9.0"

# Protobuf
protobuf = "0.9.4"

# Misc
commonsvalidator = "1.9.0"
dependency-check = "10.0.3"
dependency-check = "10.0.4"
dependency-versions = "0.51.0"
detekt = "1.23.6"
jodatime = "2.12.7"
detekt = "1.23.7"
jodatime = "2.13.0"
kermit = "2.0.4"
konsist = "0.15.1"
konsist = "0.16.1"
ktfmt = "0.20.1"
leakcanary = "2.13"
leakcanary = "2.14"
mockk = "1.13.12"
mockwebserver = "4.12.0"
play-publisher = "3.9.0"
play-publisher = "3.11.0"
turbine = "1.1.0"

[libraries]
Expand Down
Loading

0 comments on commit 9a8c583

Please sign in to comment.