From d7515a7e97da03a3936a9da2e82de28ba823b376 Mon Sep 17 00:00:00 2001 From: alperozturk96 Date: Fri, 19 Jun 2026 14:48:45 +0200 Subject: [PATCH 1/9] chore(build): update Signed-off-by: alperozturk96 --- build.gradle | 4 ++-- gradle.properties | 10 ++-------- library/build.gradle | 19 +++++++++++++------ 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/build.gradle b/build.gradle index 2b44cdef6..c56ea9c81 100644 --- a/build.gradle +++ b/build.gradle @@ -37,11 +37,11 @@ subprojects { } } -task clean(type: Delete) { +tasks.register('clean', Delete) { delete rootProject.buildDir } -task installGitHooks(type: Copy, group: "development") { +tasks.register('installGitHooks', Copy) { def sourceFolder = "${rootProject.projectDir}/scripts/hooks" def destFolder = "${rootProject.projectDir}/.git/hooks" diff --git a/gradle.properties b/gradle.properties index f61f80964..b60c16c8a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,19 +16,13 @@ android.nonTransitiveRClass=false android.nonFinalResIds=false # JVM arguments to optimize heap usage, enable heap dump on out-of-memory errors, and set the file encoding -org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +org.gradle.jvmargs=-Xmx3g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8 org.gradle.dependency.verification.console=verbose -kotlin.daemon.jvmargs=-Xmx4096m +kotlin.daemon.jvmargs=-Xmx3072m org.gradle.caching=true org.gradle.parallel=true org.gradle.configureondemand=true android.defaults.buildfeatures.resvalues=true -android.sdk.defaultTargetSdkToCompileSdkIfUnset=false -android.enableAppCompileTimeRClass=false android.usesSdkInManifest.disallowed=false android.uniquePackageNames=false android.dependency.useConstraints=true -android.r8.strictFullModeForKeepRules=false -android.r8.optimizedResourceShrinking=false -android.builtInKotlin=false -android.newDsl=false diff --git a/library/build.gradle b/library/build.gradle index 279159145..1ae7291e5 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -34,7 +34,6 @@ plugins { } apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' apply plugin: 'kotlin-parcelize' apply plugin: 'org.jetbrains.kotlin.plugin.serialization' apply from: "$rootProject.projectDir/jacoco.gradle" @@ -159,12 +158,14 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_17 - targetCompatibility JavaVersion.VERSION_17 + sourceCompatibility JavaVersion.VERSION_21 + targetCompatibility JavaVersion.VERSION_21 } - - kotlinOptions { - jvmTarget = '17' + + kotlin { + jvmToolchain { + languageVersion.set(JavaLanguageVersion.of(21)) + } } testOptions { @@ -182,6 +183,12 @@ android { } namespace = 'com.owncloud.android.lib' + + publishing { + singleVariant("release") { + withSourcesJar() + } + } } tasks.register("combinedTestReport", JacocoReport) { From dd64a88883a47de8d879e00603108402c9b8f729 Mon Sep 17 00:00:00 2001 From: alperozturk96 Date: Thu, 16 Jul 2026 16:02:17 +0200 Subject: [PATCH 2/9] update workflow files Signed-off-by: alperozturk96 --- .github/workflows/assemble.yml | 2 +- .github/workflows/check.yml | 2 +- .github/workflows/garm.yml | 2 +- sample_client/build.gradle | 6 ++++ .../lib/sampleclient/MainActivity.java | 31 ++++++++----------- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.github/workflows/assemble.yml b/.github/workflows/assemble.yml index 750ce3861..0f75e589b 100644 --- a/.github/workflows/assemble.yml +++ b/.github/workflows/assemble.yml @@ -24,7 +24,7 @@ jobs: uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 with: distribution: "temurin" - java-version: 17 + java-version: 21 - uses: gradle/actions/wrapper-validation@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 - name: Setup JVM options run: | diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 68daecf4f..ed43fb86d 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -25,7 +25,7 @@ jobs: uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 with: distribution: "temurin" - java-version: 17 + java-version: 21 - name: Setup JVM options run: | mkdir -p "$HOME/.gradle" diff --git a/.github/workflows/garm.yml b/.github/workflows/garm.yml index bbd6f7a86..466c7b703 100644 --- a/.github/workflows/garm.yml +++ b/.github/workflows/garm.yml @@ -48,7 +48,7 @@ jobs: uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 with: distribution: "temurin" - java-version: 17 + java-version: 21 - name: Enable KVM group perms run: | diff --git a/sample_client/build.gradle b/sample_client/build.gradle index a6b6b43dd..c6ecbda17 100644 --- a/sample_client/build.gradle +++ b/sample_client/build.gradle @@ -47,6 +47,12 @@ android { testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_21 + targetCompatibility JavaVersion.VERSION_21 + } + namespace = 'com.owncloud.android.lib.sampleclient' lint { abortOnError false diff --git a/sample_client/src/main/java/com/owncloud/android/lib/sampleclient/MainActivity.java b/sample_client/src/main/java/com/owncloud/android/lib/sampleclient/MainActivity.java index 035589b4c..0d32c04db 100644 --- a/sample_client/src/main/java/com/owncloud/android/lib/sampleclient/MainActivity.java +++ b/sample_client/src/main/java/com/owncloud/android/lib/sampleclient/MainActivity.java @@ -116,24 +116,19 @@ public void onDestroy() { public void onClickHandler(View button) { - switch (button.getId()) { - case R.id.button_refresh: - startRefresh(); - break; - case R.id.button_upload: - startUpload(); - break; - case R.id.button_delete_remote: - startRemoteDeletion(); - break; - case R.id.button_download: - startDownload(); - break; - case R.id.button_delete_local: - startLocalDeletion(); - break; - default: - Toast.makeText(this, R.string.youre_doing_it_wrong, Toast.LENGTH_SHORT).show(); + int id = button.getId(); + if (id == R.id.button_refresh) { + startRefresh(); + } else if (id == R.id.button_upload) { + startUpload(); + } else if (id == R.id.button_delete_remote) { + startRemoteDeletion(); + } else if (id == R.id.button_download) { + startDownload(); + } else if (id == R.id.button_delete_local) { + startLocalDeletion(); + } else { + Toast.makeText(this, R.string.youre_doing_it_wrong, Toast.LENGTH_SHORT).show(); } } From 6d2424901374b1540d6ab0d216b22cf41dddd235 Mon Sep 17 00:00:00 2001 From: alperozturk96 Date: Thu, 16 Jul 2026 16:09:36 +0200 Subject: [PATCH 3/9] update workflow files Signed-off-by: alperozturk96 # Conflicts: # .github/workflows/assemble.yml # .github/workflows/check.yml # .github/workflows/garm.yml --- jitpack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jitpack.yml b/jitpack.yml index f0b5f2e60..d91129242 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -2,6 +2,6 @@ # SPDX-FileCopyrightText: 2021-2023 Tobias Kaminsky # SPDX-License-Identifier: MIT jdk: - - openjdk17 + - openjdk21 install: - ./gradlew :library:publishReleasePublicationToMavenLocal From ff7e1131d1e408e3e652d0685713ab220ab5ab4a Mon Sep 17 00:00:00 2001 From: alperozturk96 Date: Thu, 16 Jul 2026 16:12:38 +0200 Subject: [PATCH 4/9] Enabled parallel sync for Gradle 9.4+ Signed-off-by: alperozturk96 --- gradle.properties | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gradle.properties b/gradle.properties index b60c16c8a..38ac26b7a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -26,3 +26,6 @@ android.defaults.buildfeatures.resvalues=true android.usesSdkInManifest.disallowed=false android.uniquePackageNames=false android.dependency.useConstraints=true + +# Enabled parallel sync for Gradle 9.4+ +org.gradle.tooling.parallel=true From ff150f80c8bf113fca3f51017e85dee8f3e44bff Mon Sep 17 00:00:00 2001 From: alperozturk96 Date: Fri, 17 Jul 2026 10:05:11 +0200 Subject: [PATCH 5/9] wip Signed-off-by: alperozturk96 # Conflicts: # .github/workflows/assemble.yml # .github/workflows/check.yml --- .github/workflows/garm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/garm.yml b/.github/workflows/garm.yml index 466c7b703..3837efdf6 100644 --- a/.github/workflows/garm.yml +++ b/.github/workflows/garm.yml @@ -44,7 +44,7 @@ jobs: docker exec --user www-data server /tmp/configNC.sh ${{ matrix.server }} docker exec server /usr/local/bin/run.sh - - name: set up JDK 17 + - name: set up JDK 21 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 with: distribution: "temurin" From 5d0d4d5a7e2fe5bbba17fecf620e7a3578065f52 Mon Sep 17 00:00:00 2001 From: alperozturk96 Date: Tue, 21 Jul 2026 09:00:58 +0200 Subject: [PATCH 6/9] wip Signed-off-by: alperozturk96 --- .github/workflows/assemble.yml | 2 +- .github/workflows/check.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/assemble.yml b/.github/workflows/assemble.yml index 0f75e589b..15fb52756 100644 --- a/.github/workflows/assemble.yml +++ b/.github/workflows/assemble.yml @@ -20,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 with: distribution: "temurin" diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index ed43fb86d..1531df002 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -21,7 +21,7 @@ jobs: task: [ detekt, spotlessKotlinCheck, lint ] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 with: distribution: "temurin" From 64f91b5e54c1e78658cc76273463e2e61b00efad Mon Sep 17 00:00:00 2001 From: alperozturk96 Date: Tue, 21 Jul 2026 13:31:00 +0200 Subject: [PATCH 7/9] reduce target compatibility to java 17 Signed-off-by: alperozturk96 --- library/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/build.gradle b/library/build.gradle index 1ae7291e5..7809b2db0 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -159,7 +159,7 @@ android { compileOptions { sourceCompatibility JavaVersion.VERSION_21 - targetCompatibility JavaVersion.VERSION_21 + targetCompatibility JavaVersion.VERSION_17 } kotlin { From 4a24b53307c3dbdecac7c6bdb2eb4df1ec603c3d Mon Sep 17 00:00:00 2001 From: alperozturk96 Date: Tue, 21 Jul 2026 13:39:17 +0200 Subject: [PATCH 8/9] revert to 17 Signed-off-by: alperozturk96 --- .github/workflows/analysis.yml | 4 ++-- .github/workflows/assemble.yml | 4 ++-- .github/workflows/check.yml | 4 ++-- .github/workflows/codeql.yml | 4 ++-- .github/workflows/garm.yml | 4 ++-- jitpack.yml | 2 +- library/build.gradle | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index bca234954..1ac9ed96a 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -56,11 +56,11 @@ jobs: persist-credentials: false repository: ${{ steps.get-vars.outputs.repo }} ref: ${{ steps.get-vars.outputs.branch }} - - name: Set up JDK 21 + - name: Set up JDK 17 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 with: distribution: "temurin" - java-version: 21 + java-version: 17 - name: Install dependencies run: | sudo apt install python3-defusedxml diff --git a/.github/workflows/assemble.yml b/.github/workflows/assemble.yml index 15fb52756..750ce3861 100644 --- a/.github/workflows/assemble.yml +++ b/.github/workflows/assemble.yml @@ -20,11 +20,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Set up JDK 21 + - name: Set up JDK 17 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 with: distribution: "temurin" - java-version: 21 + java-version: 17 - uses: gradle/actions/wrapper-validation@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 - name: Setup JVM options run: | diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 1531df002..68daecf4f 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -21,11 +21,11 @@ jobs: task: [ detekt, spotlessKotlinCheck, lint ] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - name: Set up JDK 21 + - name: Set up JDK 17 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 with: distribution: "temurin" - java-version: 21 + java-version: 17 - name: Setup JVM options run: | mkdir -p "$HOME/.gradle" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 99b3f31e8..c3b2cbed0 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -46,11 +46,11 @@ jobs: uses: github/codeql-action/init@7188fc363630916deb702c7fdcf4e481b751f97a # v4.37.1 with: languages: ${{ matrix.language }} - - name: Set up JDK 21 + - name: Set up JDK 17 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 with: distribution: "temurin" - java-version: 21 + java-version: 17 - name: Assemble run: | mkdir -p "$HOME/.gradle" diff --git a/.github/workflows/garm.yml b/.github/workflows/garm.yml index 3837efdf6..bbd6f7a86 100644 --- a/.github/workflows/garm.yml +++ b/.github/workflows/garm.yml @@ -44,11 +44,11 @@ jobs: docker exec --user www-data server /tmp/configNC.sh ${{ matrix.server }} docker exec server /usr/local/bin/run.sh - - name: set up JDK 21 + - name: set up JDK 17 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 with: distribution: "temurin" - java-version: 21 + java-version: 17 - name: Enable KVM group perms run: | diff --git a/jitpack.yml b/jitpack.yml index d91129242..f0b5f2e60 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -2,6 +2,6 @@ # SPDX-FileCopyrightText: 2021-2023 Tobias Kaminsky # SPDX-License-Identifier: MIT jdk: - - openjdk21 + - openjdk17 install: - ./gradlew :library:publishReleasePublicationToMavenLocal diff --git a/library/build.gradle b/library/build.gradle index 7809b2db0..396e807c5 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -158,13 +158,13 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_21 + sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 } kotlin { jvmToolchain { - languageVersion.set(JavaLanguageVersion.of(21)) + languageVersion.set(JavaLanguageVersion.of(17)) } } From 1748b348c0b3251d01d3ff2d219f6c7d30ae976a Mon Sep 17 00:00:00 2001 From: alperozturk96 Date: Tue, 21 Jul 2026 13:41:05 +0200 Subject: [PATCH 9/9] wip Signed-off-by: alperozturk96 --- .github/workflows/analysis.yml | 4 ++-- .github/workflows/codeql.yml | 4 ++-- sample_client/build.gradle | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 1ac9ed96a..bca234954 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -56,11 +56,11 @@ jobs: persist-credentials: false repository: ${{ steps.get-vars.outputs.repo }} ref: ${{ steps.get-vars.outputs.branch }} - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 with: distribution: "temurin" - java-version: 17 + java-version: 21 - name: Install dependencies run: | sudo apt install python3-defusedxml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c3b2cbed0..99b3f31e8 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -46,11 +46,11 @@ jobs: uses: github/codeql-action/init@7188fc363630916deb702c7fdcf4e481b751f97a # v4.37.1 with: languages: ${{ matrix.language }} - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 with: distribution: "temurin" - java-version: 17 + java-version: 21 - name: Assemble run: | mkdir -p "$HOME/.gradle" diff --git a/sample_client/build.gradle b/sample_client/build.gradle index c6ecbda17..f2065110f 100644 --- a/sample_client/build.gradle +++ b/sample_client/build.gradle @@ -49,8 +49,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_21 - targetCompatibility JavaVersion.VERSION_21 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } namespace = 'com.owncloud.android.lib.sampleclient'