Skip to content

Colota - Android GPS Location tracker

Pin AGP version and fix librnscreens build ID for reproducible builds

Max Dietrich8df13e94b3ed
diff --git a/.github/workflows/build-latest-release.yml b/.github/workflows/build-latest-release.yml
index 769f763c..85dc5269 100644
--- a/.github/workflows/build-latest-release.yml
+++ b/.github/workflows/build-latest-release.yml
@@ -78,10 +78,12 @@ jobs:
- name: Build shared package
run: npm run build -w @colota/shared
- - name: Pin dev server IP for reproducible builds
+ - name: Patch node_modules for reproducible builds
run: |
sed -i 's/getHostIpAddress(),/project.properties["reactNativeDevServerIp"]?.toString() ?: "localhost",/' \
node_modules/@react-native/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt
+ sed -i '/^project(rnscreens)/a add_link_options(-Wl,--build-id=none)' \
+ node_modules/react-native-screens/android/CMakeLists.txt
- name: Append signing config to gradle.properties
run: |
@@ -150,10 +152,12 @@ jobs:
- name: Build shared package
run: npm run build -w @colota/shared
- - name: Pin dev server IP for reproducible builds
+ - name: Patch node_modules for reproducible builds
run: |
sed -i 's/getHostIpAddress(),/project.properties["reactNativeDevServerIp"]?.toString() ?: "localhost",/' \
node_modules/@react-native/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt
+ sed -i '/^project(rnscreens)/a add_link_options(-Wl,--build-id=none)' \
+ node_modules/react-native-screens/android/CMakeLists.txt
- name: Append signing config to gradle.properties
run: |
diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml
index 8cd69772..86903c85 100644
--- a/.github/workflows/build-release.yml
+++ b/.github/workflows/build-release.yml
@@ -71,10 +71,12 @@ jobs:
- name: Build shared package
run: npm run build -w @colota/shared
- - name: Pin dev server IP for reproducible builds
+ - name: Patch node_modules for reproducible builds
run: |
sed -i 's/getHostIpAddress(),/project.properties["reactNativeDevServerIp"]?.toString() ?: "localhost",/' \
node_modules/@react-native/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt
+ sed -i '/^project(rnscreens)/a add_link_options(-Wl,--build-id=none)' \
+ node_modules/react-native-screens/android/CMakeLists.txt
- name: Append signing config to gradle.properties
run: |
@@ -143,10 +145,12 @@ jobs:
- name: Build shared package
run: npm run build -w @colota/shared
- - name: Pin dev server IP for reproducible builds
+ - name: Patch node_modules for reproducible builds
run: |
sed -i 's/getHostIpAddress(),/project.properties["reactNativeDevServerIp"]?.toString() ?: "localhost",/' \
node_modules/@react-native/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/utils/AgpConfiguratorUtils.kt
+ sed -i '/^project(rnscreens)/a add_link_options(-Wl,--build-id=none)' \
+ node_modules/react-native-screens/android/CMakeLists.txt
- name: Append signing config to gradle.properties
run: |
diff --git a/apps/mobile/android/build.gradle b/apps/mobile/android/build.gradle
index 8e5363e0..73e382e7 100644
--- a/apps/mobile/android/build.gradle
+++ b/apps/mobile/android/build.gradle
@@ -12,7 +12,7 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath("com.android.tools.build:gradle")
+ classpath("com.android.tools.build:gradle:8.12.0")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}