Compare commits

..

6 Commits

Author SHA1 Message Date
Zane Schepke b8deb7b644 chore: bump version
ci: add tag deploy
2025-05-16 01:38:01 -04:00
Zane Schepke d5a3090782 chore(deps): bump ksp, kotlin, agp 2025-05-16 00:23:00 -04:00
Zane Schepke 063cbf3ea6 fix: active network tracking bug
#768
closes #789
2025-05-16 00:07:54 -04:00
Zane Schepke 4a45387efd fix: fdroid reproducibility baseline profile bug
closes #780
2025-05-12 02:30:10 -04:00
Zane Schepke fa064ef3a6 fix: qr scanner bug, disable beep
closes #776
2025-05-12 02:16:49 -04:00
Zane Schepke 3f8894a566 chore(deps): bump deps 2025-05-12 02:03:37 -04:00
8 changed files with 46 additions and 33 deletions
+19 -14
View File
@@ -4,6 +4,9 @@ permissions:
packages: write
on:
push:
tags:
- '[0-9]*.[0-9]*.[0-9]*'
workflow_dispatch:
inputs:
track:
@@ -49,19 +52,19 @@ on:
jobs:
build-fdroid:
if: ${{ inputs.release_type == 'release' || inputs.flavor == 'fdroid' }}
if: ${{ github.event_name == 'push' || inputs.release_type == 'release' || inputs.flavor == 'fdroid' }}
uses: ./.github/workflows/build.yml
secrets: inherit
with:
build_type: ${{ inputs.release_type }}
build_type: ${{ github.event_name == 'push' && 'release' || inputs.release_type }}
flavor: fdroid
build-standalone:
if: ${{ inputs.release_type == 'release' || inputs.release_type == 'prerelease' || inputs.flavor == 'standalone' }}
if: ${{ github.event_name == 'push' || inputs.release_type == 'release' || inputs.release_type == 'prerelease' || inputs.flavor == 'standalone' }}
uses: ./.github/workflows/build.yml
secrets: inherit
with:
build_type: ${{ inputs.release_type }}
build_type: ${{ github.event_name == 'push' && 'release' || inputs.release_type }}
flavor: standalone
publish:
@@ -72,7 +75,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: main
ref: ${{ github.event_name == 'push' && github.ref || 'main' }}
- name: Install system dependencies
run: |
sudo apt update && sudo apt install -y gh apksigner
@@ -113,7 +116,7 @@ jobs:
merge-multiple: true
- name: Set version release notes
if: ${{ inputs.release_type == 'release' }}
if: ${{ github.event_name == 'push' || inputs.release_type == 'release' }}
run: |
VERSION_NAME=$(grep "const val VERSION_NAME" buildSrc/src/main/kotlin/Constants.kt | awk -F'"' '{print $2}')
RELEASE_NOTES="$(cat ${{ github.workspace }}/fastlane/metadata/android/en-US/changelogs/${VERSION_NAME}.txt || echo "No changelog found for ${VERSION_NAME}")"
@@ -122,7 +125,7 @@ jobs:
echo "EOF" >> $GITHUB_ENV
- name: On prerelease release notes
if: ${{ inputs.release_type == 'prerelease' }}
if: ${{ github.event_name != 'push' && inputs.release_type == 'prerelease' }}
run: |
echo "RELEASE_NOTES=Testing version of app for specific feature." >> $GITHUB_ENV
@@ -156,11 +159,11 @@ jobs:
### Changelog
${{ steps.changelog.outputs.changes }}
tag_name: ${{ github.event.inputs.tag_name }}
name: ${{ github.event.inputs.tag_name }}
tag_name: ${{ github.event_name == 'push' && github.ref_name || github.event.inputs.tag_name }}
name: ${{ github.event_name == 'push' && github.ref_name || github.event.inputs.tag_name }}
draft: false
prerelease: ${{ inputs.release_type == 'prerelease' }}
make_latest: ${{ inputs.release_type == 'release' }}
prerelease: ${{ github.event_name != 'push' && inputs.release_type == 'prerelease' }}
make_latest: ${{ github.event_name == 'push' || inputs.release_type == 'release' }}
files: |
${{ github.workspace }}/temp/**/*.apk
env:
@@ -170,7 +173,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- build-fdroid
if: inputs.release_type == 'release'
if: ${{ github.event_name == 'push' || inputs.release_type == 'release' }}
steps:
- name: Dispatch update for fdroid repo
uses: peter-evans/repository-dispatch@v3
@@ -180,7 +183,7 @@ jobs:
event-type: fdroid-update
publish-play:
if: ${{ inputs.track != 'none' }}
if: ${{ github.event_name == 'push' || inputs.track != 'none' }}
name: Publish to Google Play
runs-on: ubuntu-latest
@@ -230,4 +233,6 @@ jobs:
bundler-cache: true
- name: Distribute app to Prod track 🚀
run: (cd ${{ github.workspace }} && bundle install && bundle exec fastlane ${{ inputs.track }})
run: |
track=${{ github.event_name == 'push' && 'production' || inputs.track }}
(cd ${{ github.workspace }} && bundle install && bundle exec fastlane $track)
+7
View File
@@ -231,3 +231,10 @@ tasks.register<Copy>("copyLicenseeJsonToAssets") {
}
tasks.named("preBuild") { dependsOn("copyLicenseeJsonToAssets") }
// https://gist.github.com/obfusk/61046e09cee352ae6dd109911534b12e#fix-proposed-by-linsui-disable-baseline-profiles
tasks.whenTaskAdded {
if (name.contains("ArtProfile")) {
enabled = false
}
}
@@ -51,10 +51,8 @@ fun MainScreen(appUiState: AppUiState, appViewState: AppViewState, viewModel: Ap
rememberLauncherForActivityResult(
contract = ScanContract(),
onResult = { result ->
{
if (result != null && result.contents.isNotEmpty())
viewModel.handleEvent(AppEvent.ImportTunnelFromQrCode(result.contents))
}
if (result != null && result.contents.isNotEmpty())
viewModel.handleEvent(AppEvent.ImportTunnelFromQrCode(result.contents))
},
)
@@ -69,7 +67,7 @@ fun MainScreen(appUiState: AppUiState, appViewState: AppViewState, viewModel: Ap
)
return@rememberLauncherForActivityResult
}
scanLauncher.launch(ScanOptions().setDesiredBarcodeFormats(ScanOptions.QR_CODE))
scanLauncher.launch(ScanOptions().setDesiredBarcodeFormats(ScanOptions.QR_CODE).setBeepEnabled(false))
}
if (appViewState.showModal == AppViewState.ModalType.DELETE) {
@@ -400,7 +400,6 @@ constructor(
private suspend fun handleClipboardImport(config: String, tunnels: List<TunnelConf>) {
runCatching {
Timber.d("Config: $config")
val amConfig = TunnelConf.configFromAmQuick(config)
val tunnelConf = TunnelConf.tunnelConfigFromAmConfig(amConfig)
saveTunnel(
+2 -2
View File
@@ -1,7 +1,7 @@
object Constants {
const val VERSION_NAME = "3.9.1"
const val VERSION_NAME = "3.9.2"
const val JVM_TARGET = "17"
const val VERSION_CODE = 39100
const val VERSION_CODE = 39200
const val TARGET_SDK = 35
const val MIN_SDK = 26
const val APP_ID = "com.zaneschepke.wireguardautotunnel"
@@ -0,0 +1,4 @@
What's new:
- Fixes QR scanner bug
- Fixes active Wi-Fi network tracking bug
- Fixes Fdroid reproducibility
+8 -8
View File
@@ -6,17 +6,17 @@ androidx-junit = "1.2.1"
appcompat = "1.7.0"
biometricKtx = "1.2.0-alpha05"
coreKtx = "1.16.0"
datastorePreferences = "1.2.0-alpha01"
datastorePreferences = "1.2.0-alpha02"
desugar_jdk_libs = "2.1.5"
espressoCore = "3.6.1"
hiltAndroid = "2.56.2"
hiltCompiler = "1.2.0"
junit = "4.13.2"
kotlinx-serialization-json = "1.8.1"
ktorClientCore = "3.1.2"
lifecycle-runtime-compose = "2.8.7"
ktorClientCore = "3.1.3"
lifecycle-runtime-compose = "2.9.0"
material3 = "1.3.2"
navigationCompose = "2.8.9"
navigationCompose = "2.9.0"
pinLockCompose = "1.0.4"
qrose = "1.0.1"
roomVersion = "2.7.1"
@@ -24,10 +24,10 @@ semver4j = "3.1.0"
slf4jAndroid = "1.7.36"
timber = "5.0.1"
tunnel = "1.3.0"
androidGradlePlugin = "8.9.2"
kotlin = "2.1.20"
ksp = "2.1.20-2.0.1"
composeBom = "2025.04.01"
androidGradlePlugin = "8.9.3"
kotlin = "2.1.21"
ksp = "2.1.21-2.0.1"
composeBom = "2025.05.00"
compose = "1.8.1"
icons = "1.7.8"
workRuntimeKtxVersion = "2.10.1"
@@ -51,7 +51,7 @@ class AndroidNetworkMonitor(
@get:Synchronized @set:Synchronized var wifiConnected = false
// Track active Wi-Fi networks and last active network ID
private val activeNetworks = Collections.synchronizedSet(mutableSetOf<Network>())
private val activeNetworks = Collections.synchronizedSet(mutableSetOf<String>())
data class WifiState(
val connected: Boolean = false,
@@ -148,7 +148,7 @@ class AndroidNetworkMonitor(
object : ConnectivityManager.NetworkCallback() {
override fun onAvailable(network: Network) {
Timber.d("Wi-Fi onAvailable: network=$network")
activeNetworks.add(network)
activeNetworks.add(network.toString())
launch {
currentSsid = getWifiSsid()
securityType = wifiManager?.getCurrentSecurityType()
@@ -165,7 +165,7 @@ class AndroidNetworkMonitor(
override fun onLost(network: Network) {
Timber.d("Wi-Fi onLost: network=$network")
activeNetworks.remove(network)
activeNetworks.remove(network.toString())
if (activeNetworks.isEmpty()) {
Timber.d(
"All Wi-Fi networks disconnected, clearing currentSsid and wifiConnected"