mirror of
https://github.com/wgtunnel/android.git
synced 2026-07-03 14:07:49 +02:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1987712fac |
@@ -4,9 +4,6 @@ permissions:
|
||||
packages: write
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '[0-9]*.[0-9]*.[0-9]*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
track:
|
||||
@@ -52,19 +49,19 @@ on:
|
||||
jobs:
|
||||
|
||||
build-fdroid:
|
||||
if: ${{ github.event_name == 'push' || inputs.release_type == 'release' || inputs.flavor == 'fdroid' }}
|
||||
if: ${{ inputs.release_type == 'release' || inputs.flavor == 'fdroid' }}
|
||||
uses: ./.github/workflows/build.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
build_type: ${{ github.event_name == 'push' && 'release' || inputs.release_type }}
|
||||
build_type: ${{ inputs.release_type }}
|
||||
flavor: fdroid
|
||||
|
||||
build-standalone:
|
||||
if: ${{ github.event_name == 'push' || inputs.release_type == 'release' || inputs.release_type == 'prerelease' || inputs.flavor == 'standalone' }}
|
||||
if: ${{ inputs.release_type == 'release' || inputs.release_type == 'prerelease' || inputs.flavor == 'standalone' }}
|
||||
uses: ./.github/workflows/build.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
build_type: ${{ github.event_name == 'push' && 'release' || inputs.release_type }}
|
||||
build_type: ${{ inputs.release_type }}
|
||||
flavor: standalone
|
||||
|
||||
publish:
|
||||
@@ -75,7 +72,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event_name == 'push' && github.ref || 'main' }}
|
||||
ref: main
|
||||
- name: Install system dependencies
|
||||
run: |
|
||||
sudo apt update && sudo apt install -y gh apksigner
|
||||
@@ -116,7 +113,7 @@ jobs:
|
||||
merge-multiple: true
|
||||
|
||||
- name: Set version release notes
|
||||
if: ${{ github.event_name == 'push' || inputs.release_type == 'release' }}
|
||||
if: ${{ 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}")"
|
||||
@@ -125,7 +122,7 @@ jobs:
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
|
||||
- name: On prerelease release notes
|
||||
if: ${{ github.event_name != 'push' && inputs.release_type == 'prerelease' }}
|
||||
if: ${{ inputs.release_type == 'prerelease' }}
|
||||
run: |
|
||||
echo "RELEASE_NOTES=Testing version of app for specific feature." >> $GITHUB_ENV
|
||||
|
||||
@@ -159,11 +156,11 @@ jobs:
|
||||
|
||||
### Changelog
|
||||
${{ steps.changelog.outputs.changes }}
|
||||
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 }}
|
||||
tag_name: ${{ github.event.inputs.tag_name }}
|
||||
name: ${{ github.event.inputs.tag_name }}
|
||||
draft: false
|
||||
prerelease: ${{ github.event_name != 'push' && inputs.release_type == 'prerelease' }}
|
||||
make_latest: ${{ github.event_name == 'push' || inputs.release_type == 'release' }}
|
||||
prerelease: ${{ inputs.release_type == 'prerelease' }}
|
||||
make_latest: ${{ inputs.release_type == 'release' }}
|
||||
files: |
|
||||
${{ github.workspace }}/temp/**/*.apk
|
||||
env:
|
||||
@@ -173,7 +170,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-fdroid
|
||||
if: ${{ github.event_name == 'push' || inputs.release_type == 'release' }}
|
||||
if: inputs.release_type == 'release'
|
||||
steps:
|
||||
- name: Dispatch update for fdroid repo
|
||||
uses: peter-evans/repository-dispatch@v3
|
||||
@@ -183,7 +180,7 @@ jobs:
|
||||
event-type: fdroid-update
|
||||
|
||||
publish-play:
|
||||
if: ${{ github.event_name == 'push' || inputs.track != 'none' }}
|
||||
if: ${{ inputs.track != 'none' }}
|
||||
name: Publish to Google Play
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -233,6 +230,4 @@ jobs:
|
||||
bundler-cache: true
|
||||
|
||||
- name: Distribute app to Prod track 🚀
|
||||
run: |
|
||||
track=${{ github.event_name == 'push' && 'production' || inputs.track }}
|
||||
(cd ${{ github.workspace }} && bundle install && bundle exec fastlane $track)
|
||||
run: (cd ${{ github.workspace }} && bundle install && bundle exec fastlane ${{ inputs.track }})
|
||||
@@ -231,10 +231,3 @@ 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,8 +51,10 @@ 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))
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
@@ -67,7 +69,7 @@ fun MainScreen(appUiState: AppUiState, appViewState: AppViewState, viewModel: Ap
|
||||
)
|
||||
return@rememberLauncherForActivityResult
|
||||
}
|
||||
scanLauncher.launch(ScanOptions().setDesiredBarcodeFormats(ScanOptions.QR_CODE).setBeepEnabled(false))
|
||||
scanLauncher.launch(ScanOptions().setDesiredBarcodeFormats(ScanOptions.QR_CODE))
|
||||
}
|
||||
|
||||
if (appViewState.showModal == AppViewState.ModalType.DELETE) {
|
||||
|
||||
@@ -400,6 +400,7 @@ 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(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
object Constants {
|
||||
const val VERSION_NAME = "3.9.2"
|
||||
const val VERSION_NAME = "3.9.1"
|
||||
const val JVM_TARGET = "17"
|
||||
const val VERSION_CODE = 39200
|
||||
const val VERSION_CODE = 39100
|
||||
const val TARGET_SDK = 35
|
||||
const val MIN_SDK = 26
|
||||
const val APP_ID = "com.zaneschepke.wireguardautotunnel"
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
What's new:
|
||||
- Fixes QR scanner bug
|
||||
- Fixes active Wi-Fi network tracking bug
|
||||
- Fixes Fdroid reproducibility
|
||||
@@ -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-alpha02"
|
||||
datastorePreferences = "1.2.0-alpha01"
|
||||
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.3"
|
||||
lifecycle-runtime-compose = "2.9.0"
|
||||
ktorClientCore = "3.1.2"
|
||||
lifecycle-runtime-compose = "2.8.7"
|
||||
material3 = "1.3.2"
|
||||
navigationCompose = "2.9.0"
|
||||
navigationCompose = "2.8.9"
|
||||
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.3"
|
||||
kotlin = "2.1.21"
|
||||
ksp = "2.1.21-2.0.1"
|
||||
composeBom = "2025.05.00"
|
||||
androidGradlePlugin = "8.9.2"
|
||||
kotlin = "2.1.20"
|
||||
ksp = "2.1.20-2.0.1"
|
||||
composeBom = "2025.04.01"
|
||||
compose = "1.8.1"
|
||||
icons = "1.7.8"
|
||||
workRuntimeKtxVersion = "2.10.1"
|
||||
|
||||
+3
-3
@@ -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<String>())
|
||||
private val activeNetworks = Collections.synchronizedSet(mutableSetOf<Network>())
|
||||
|
||||
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.toString())
|
||||
activeNetworks.add(network)
|
||||
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.toString())
|
||||
activeNetworks.remove(network)
|
||||
if (activeNetworks.isEmpty()) {
|
||||
Timber.d(
|
||||
"All Wi-Fi networks disconnected, clearing currentSsid and wifiConnected"
|
||||
|
||||
Reference in New Issue
Block a user