Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ jobs:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: 17
java-version: 21
- name: Build and Test
run: bash ./gradlew clean test --stacktrace
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Cryptomator for Android is currently available in the following distribution ch
### Dependencies

* Git
* JDK 17
* JDK 21
* Gradle

### Run Git and Gradle
Expand Down
20 changes: 8 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,21 @@ buildscript {
}
dependencies {
// before upgrading AGP, check https://gitlab.com/fdroid/admin/-/issues/593
classpath 'com.android.tools.build:gradle:8.13.2'
classpath 'com.android.tools.build:gradle:9.4.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "de.mannodermaus.gradle.plugins:android-junit5:1.7.1.1"
}
}

def getVersionCode = { ->
try {
def branchName = new ByteArrayOutputStream()
exec {
def branchName = providers.exec {
commandLine 'git', 'rev-parse', '--abbrev-ref', 'HEAD'
standardOutput = branchName
}
def appBuild = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-list', '--count', branchName.toString().trim()
standardOutput = appBuild
}
return Integer.parseInt(appBuild.toString().trim()) + 1958 // adding 1958 for legacy reasons
}.standardOutput.asText.get().trim()
def appBuild = providers.exec {
commandLine 'git', 'rev-list', '--count', branchName
}.standardOutput.asText.get().trim()
return Integer.parseInt(appBuild) + 1958 // adding 1958 for legacy reasons
}
catch (ignored) {
return -1
Expand All @@ -49,7 +45,7 @@ allprojects {
}

task clean(type: Delete) {
delete rootProject.buildDir
delete rootProject.layout.buildDirectory
}

def getApiKey(key) {
Expand Down
6 changes: 3 additions & 3 deletions buildsystem/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ RUN apt-get update -y && apt-get install -y $(cat docker/dependencies.txt)
RUN docker/print-versions.sh docker/dependencies.txt

ENV ANDROID_COMMAND_LINE_TOOLS_FILENAME commandlinetools-linux-10406996_latest.zip
ENV ANDROID_API_LEVELS android-36
ENV ANDROID_BUILD_TOOLS_VERSION 36.1.0
ENV ANDROID_API_LEVELS android-37
ENV ANDROID_BUILD_TOOLS_VERSION 37.0.0

ENV ANDROID_HOME /usr/local/android-sdk-linux
ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_HOME}/cmdline-tools/bin
Expand All @@ -35,7 +35,7 @@ RUN yes | sdkmanager --update --sdk_root="${ANDROID_HOME}"
RUN yes | sdkmanager --sdk_root="${ANDROID_HOME}" "platforms;${ANDROID_API_LEVELS}" "build-tools;${ANDROID_BUILD_TOOLS_VERSION}"

RUN yes | sdkmanager --licenses --sdk_root="${ANDROID_HOME}"
RUN update-java-alternatives -s java-1.17.0-openjdk-amd64
RUN update-java-alternatives -s java-1.21.0-openjdk-amd64

RUN rm -rf ${ANDROID_HOME}/tools

Expand Down
10 changes: 5 additions & 5 deletions buildsystem/dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@ allprojects {
}

ext {
androidBuildToolsVersion = "36.1.0"
androidBuildToolsVersion = "37.0.0"
androidMinSdkVersion = 26
androidTargetSdkVersion = 36
androidCompileSdkVersion = 36
androidTargetSdkVersion = 37
androidCompileSdkVersion = 37

// android and java libs
androidVersion = '4.1.1.4'
multidexVersion = '2.0.1'
javaxAnnotationVersion = '1.0'

// support lib
Expand Down Expand Up @@ -109,6 +108,7 @@ ext {
// testing dependencies

jUnitVersion = '5.11.4'
jUnitPlatformVersion = '1.11.4' // keep in sync with jUnitVersion
assertJVersion = '1.7.1'
mockitoVersion = '5.23.0'
mockitoKotlinVersion = '6.3.0'
Expand Down Expand Up @@ -175,6 +175,7 @@ ext {
junitApi : "org.junit.jupiter:junit-jupiter-api:${jUnitVersion}",
junitEngine : "org.junit.jupiter:junit-jupiter-engine:${jUnitVersion}",
junitParams : "org.junit.jupiter:junit-jupiter-params:${jUnitVersion}",
junitPlatformLauncher : "org.junit.platform:junit-platform-launcher:${jUnitPlatformVersion}",
junit4Engine : "org.junit.vintage:junit-vintage-engine:${jUnitVersion}",
minIo : "io.minio:minio:${minIoVersion}",
mockito : "org.mockito:mockito-core:${mockitoVersion}",
Expand All @@ -183,7 +184,6 @@ ext {
mockitoAndroid : "org.mockito:mockito-android:${mockitoAndroidVersion}",
msgraph : "com.microsoft.graph:microsoft-graph:${msgraphVersion}",
msgraphAuth : "com.microsoft.identity.client:msal:${msgraphAuthVersion}",
multidex : "androidx.multidex:multidex:${multidexVersion}",
okHttp : "com.squareup.okhttp3:okhttp:${okHttpVersion}",
okHttpDigest : "io.github.rburgst:okhttp-digest:${okHttpDigestVersion}",
pcloud : "com.github.cryptomator.pcloud-sdk-java:java-core:${pcloudVersion}",
Expand Down
2 changes: 1 addition & 1 deletion buildsystem/docker/dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ apt-utils=2.9.3
wget=1.24.5-1
git=1:2.45.1-1
unzip=6.0-28
openjdk-17-jdk=17.0.11+9-1
openjdk-21-jdk=21.0.3+9-2
7 changes: 4 additions & 3 deletions data/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21

coreLibraryDesugaringEnabled true
}

kotlinOptions { jvmTarget = JavaVersion.VERSION_17 }
kotlinOptions { jvmTarget = JavaVersion.VERSION_21 }
buildFeatures {
buildConfig true
}
Expand Down Expand Up @@ -213,6 +213,7 @@ dependencies {
testRuntimeOnly dependencies.junitEngine
testImplementation dependencies.junitParams
testRuntimeOnly dependencies.junit4Engine
testRuntimeOnly dependencies.junitPlatformLauncher
implementation dependencies.androidxTestJunitKtln

testImplementation dependencies.mockito
Expand Down
7 changes: 4 additions & 3 deletions domain/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21

coreLibraryDesugaringEnabled true
}
kotlinOptions { jvmTarget = JavaVersion.VERSION_17 }
kotlinOptions { jvmTarget = JavaVersion.VERSION_21 }
buildFeatures {
buildConfig true
}
Expand Down Expand Up @@ -96,6 +96,7 @@ dependencies {
testImplementation dependencies.junitParams

testRuntimeOnly dependencies.junit4Engine
testRuntimeOnly dependencies.junitPlatformLauncher

testImplementation dependencies.mockito
testImplementation dependencies.mockitoKotlin
Expand Down
12 changes: 7 additions & 5 deletions generator-api/build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
apply plugin: 'java'

//noinspection GroovyUnusedAssignment
sourceCompatibility = 17
//noinspection GroovyUnusedAssignment
targetCompatibility = 17
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

dependencies {
def dependencies = rootProject.ext.dependencies

implementation(dependencies.android) {
// compile-only: only @Intent references android.app.Activity, and AGP 9 no longer
// auto-ignores this legacy jar, so its transitives would clash on the app runtime classpath
compileOnly(dependencies.android) {
exclude module: 'httpclient'
}
}
8 changes: 4 additions & 4 deletions generator/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apply plugin: 'java'

//noinspection GroovyUnusedAssignment
sourceCompatibility = 17
//noinspection GroovyUnusedAssignment
targetCompatibility = 17
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import javax.tools.JavaFileObject;

@SupportedAnnotationTypes("org.cryptomator.generator.Activity")
@SupportedSourceVersion(SourceVersion.RELEASE_17)
@SupportedSourceVersion(SourceVersion.RELEASE_21)
public class ActivityProcessor extends BaseProcessor {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import javax.tools.JavaFileObject;

@SupportedAnnotationTypes("org.cryptomator.generator.Callback")
@SupportedSourceVersion(SourceVersion.RELEASE_17)
@SupportedSourceVersion(SourceVersion.RELEASE_21)
public class CallbackProcessor extends BaseProcessor {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import javax.tools.JavaFileObject;

@SupportedAnnotationTypes("org.cryptomator.generator.Fragment")
@SupportedSourceVersion(SourceVersion.RELEASE_17)
@SupportedSourceVersion(SourceVersion.RELEASE_21)
public class FragmentProcessor extends BaseProcessor {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import javax.tools.JavaFileObject;

@SupportedAnnotationTypes("org.cryptomator.generator.InstanceState")
@SupportedSourceVersion(SourceVersion.RELEASE_17)
@SupportedSourceVersion(SourceVersion.RELEASE_21)
public class InstanceStateProcessor extends BaseProcessor {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import javax.tools.JavaFileObject;

@SupportedAnnotationTypes("org.cryptomator.generator.Intent")
@SupportedSourceVersion(SourceVersion.RELEASE_17)
@SupportedSourceVersion(SourceVersion.RELEASE_21)
public class IntentProcessor extends BaseProcessor {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import javax.tools.JavaFileObject;

@SupportedAnnotationTypes("org.cryptomator.generator.UseCase")
@SupportedSourceVersion(SourceVersion.RELEASE_17)
@SupportedSourceVersion(SourceVersion.RELEASE_21)
public class UseCaseProcessor extends BaseProcessor {

@Override
Expand Down
9 changes: 8 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ android.useAndroidX=true
android.enableJetifier=true
android.jetifier.ignorelist=jackson-core,fastdoubleparser
kapt.incremental.apt=false
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
# AGP 9 provides Kotlin support itself and disables the legacy variant API; both are
# still needed while this project applies the standalone 'kotlin-android' plugin,
# which calls applicationVariants/libraryVariants. see https://kotl.in/gradle/agp-built-in-kotlin
android.builtInKotlin=false
android.newDsl=false
# the generator annotations take R.layout constants (e.g. @BottomSheet(R.layout.x)), which
# the app compile-time R class does not provide: 'element value must be a constant expression'
android.enableAppCompileTimeRClass=false
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 4 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip
distributionSha256Sum=bbaeb2fef8710818cf0e261201dab964c572f92b942812df0c3620d62a529a01
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.0-bin.zip
networkTimeout=10000
retries=0
retryBackOffMs=500
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
11 changes: 4 additions & 7 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading