mirror of
https://github.com/bitfireAT/davx5-ose
synced 2024-10-01 17:00:45 +00:00
Compare commits
4 commits
d4b4981e26
...
c3436fd23f
Author | SHA1 | Date | |
---|---|---|---|
c3436fd23f | |||
5497e343c0 | |||
479a2c363a | |||
18b1e5222e |
7
.github/workflows/codeql.yml
vendored
7
.github/workflows/codeql.yml
vendored
|
@ -38,13 +38,6 @@ jobs:
|
|||
cache-encryption-key: ${{ secrets.gradle_encryption_key }}
|
||||
cache-read-only: true # gradle user home cache is generated by test jobs
|
||||
|
||||
- name: Use incremental build cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: incremental-build-tests
|
||||
restore-keys: incremental-build-tests # restore cache from main branch
|
||||
path: app/build
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
|
|
57
.github/workflows/test-dev.yml
vendored
57
.github/workflows/test-dev.yml
vendored
|
@ -8,11 +8,29 @@ concurrency:
|
|||
group: test-dev-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
is_main_branch: ${{ github.ref == 'refs/heads/main-ose' }}
|
||||
|
||||
jobs:
|
||||
compile:
|
||||
name: Compile and cache
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
# See https://community.gradle.org/github-actions/docs/setup-gradle/ for more information
|
||||
- uses: gradle/actions/setup-gradle@v3 # creates build cache when on main branch
|
||||
with:
|
||||
cache-encryption-key: ${{ secrets.gradle_encryption_key }}
|
||||
gradle-home-cache-cleanup: true # clean up unused files
|
||||
dependency-graph: generate-and-submit # submit Github Dependency Graph info
|
||||
dependency-graph-continue-on-failure: false
|
||||
|
||||
- run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn app:assembleDebug
|
||||
|
||||
test:
|
||||
needs: compile
|
||||
name: Tests without emulator
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -24,20 +42,14 @@ jobs:
|
|||
- uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
cache-encryption-key: ${{ secrets.gradle_encryption_key }}
|
||||
cache-read-only: true # gradle user home cache is generated by test_on_emulator
|
||||
|
||||
- name: Use incremental build cache
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: incremental-build-tests
|
||||
restore-keys: incremental-build-tests # restore cache from main branch
|
||||
path: app/build
|
||||
cache-read-only: true
|
||||
|
||||
- name: Run lint and unit tests
|
||||
run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn --no-daemon app:check
|
||||
run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn app:check
|
||||
|
||||
# generates the build caches because it uses more gradle dependencies
|
||||
test_on_emulator:
|
||||
needs: compile
|
||||
name: Tests with emulator
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -49,17 +61,7 @@ jobs:
|
|||
- uses: gradle/actions/setup-gradle@v3
|
||||
with:
|
||||
cache-encryption-key: ${{ secrets.gradle_encryption_key }}
|
||||
gradle-home-cache-cleanup: true # avoid ever-growing gradle user home cache
|
||||
|
||||
- name: Use incremental build cache
|
||||
if: ${{ !env.is_main_branch }}
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: incremental-build-tests
|
||||
restore-keys: incremental-build-tests # restore cache from main branch
|
||||
path: |
|
||||
.gradle/configuration-cache
|
||||
app/build
|
||||
cache-read-only: true
|
||||
|
||||
- name: Enable KVM group perms
|
||||
run: |
|
||||
|
@ -74,11 +76,4 @@ jobs:
|
|||
key: avd-${{ hashFiles('app/build.gradle.kts') }} # gradle-managed devices are defined there
|
||||
|
||||
- name: Run device tests
|
||||
run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn --no-daemon app:virtualCheck
|
||||
|
||||
- name: Create incremental build cache
|
||||
if: ${{ env.is_main_branch }}
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
key: incremental-build-tests-${{ github.run_id }}
|
||||
path: app/build
|
||||
run: ./gradlew --build-cache --configuration-cache --configuration-cache-problems=warn app:virtualCheck
|
||||
|
|
|
@ -51,6 +51,7 @@ import at.bitfire.davdroid.ui.composable.Setting
|
|||
import at.bitfire.davdroid.ui.composable.SettingsHeader
|
||||
import at.bitfire.davdroid.ui.composable.SwitchSetting
|
||||
import kotlinx.coroutines.launch
|
||||
import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
|
||||
import org.unifiedpush.android.connector.UnifiedPush
|
||||
|
||||
@Composable
|
||||
|
@ -493,8 +494,11 @@ fun AppSettings_Integration(
|
|||
val context = LocalContext.current
|
||||
|
||||
Setting(
|
||||
name = "UnifiedPush",
|
||||
summary = pushEndpoint ?: stringResource(R.string.app_settings_unifiedpush_no_endpoint),
|
||||
name = stringResource(R.string.app_settings_unifiedpush),
|
||||
summary = if (pushEndpoint != null)
|
||||
stringResource(R.string.app_settings_unifiedpush_endpoint_domain, pushEndpoint.toHttpUrlOrNull()?.host ?: pushEndpoint)
|
||||
else
|
||||
stringResource(R.string.app_settings_unifiedpush_no_endpoint),
|
||||
onClick = {
|
||||
UnifiedPush.registerAppWithDialog(context)
|
||||
}
|
||||
|
|
|
@ -210,7 +210,8 @@
|
|||
<string name="app_settings_integration">Integration</string>
|
||||
<string name="app_settings_tasks_provider">Tasks app</string>
|
||||
<string name="app_settings_tasks_provider_none">No compatible tasks app found</string>
|
||||
<string name="app_settings_unifiedpush" translatable="false">UnifiedPush</string>
|
||||
<string name="app_settings_unifiedpush">UnifiedPush (experimental)</string>
|
||||
<string name="app_settings_unifiedpush_endpoint_domain">Ready to receive push notifications (%s)</string>
|
||||
<string name="app_settings_unifiedpush_no_endpoint">No endpoint configured</string>
|
||||
|
||||
<!-- AccountScreen -->
|
||||
|
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
|||
#Mon Mar 04 14:10:49 CET 2024
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
Loading…
Reference in a new issue