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/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: "temurin"
java-version: 25
java-version: 21.0.13+9
- name: Install dependencies
run: |
sudo apt install python3-defusedxml
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/assemble.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ 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@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: "temurin"
java-version: 17.0.21+9
java-version: 21.0.13+9
- name: Setup Gradle
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0
- name: Assemble
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ 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@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: "temurin"
java-version: 17.0.21+9
java-version: 21.0.13+9
- name: Setup Gradle
uses: gradle/actions/setup-gradle@3f5f9adaf7d9fecd50b5935e54106014257a94e6 # v6.4.0
- name: Check ${{ matrix.task }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: "temurin"
java-version: 25
java-version: 21.0.13+9
- name: Assemble
run: |
mkdir -p "$HOME/.gradle"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: 'temurin'
java-version: '17.0.21+9'
java-version: '21.0.13+9'
check-latest: true
cache: 'gradle'
- name: Validate Gradle Wrapper
Expand All @@ -36,7 +36,7 @@ jobs:
- uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: 'temurin'
java-version: '17.0.21+9'
java-version: '21.0.13+9'
check-latest: true
cache: 'gradle'
- name: Unit tests
Expand Down
5 changes: 0 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ buildscript {
composeBomVersion = "2026.09.00"
kotlinxSerializationVersion = "1.12.0"
jUnitVersion = "4.13.2"
androidXTestVersion = "1.3.0"
androidXEspressoTestVersion = "3.7.0"
mockkVersion = "1.14.11"
mockitoVersion = "5.24.0"
mockitoKotlinVersion = "6.4.0"
}
}

Expand Down
12 changes: 3 additions & 9 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {
android {
namespace 'com.nextcloud.android.common.core'
defaultConfig {
minSdk = 21
minSdk = 26
compileSdk = 37

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Expand All @@ -27,8 +27,8 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
namespace 'com.nextcloud.android.common.core'

Expand All @@ -44,17 +44,11 @@ android {

dependencies {
implementation 'androidx.core:core-ktx:1.19.1'
implementation 'androidx.appcompat:appcompat:1.8.0'
implementation 'com.google.android.material:material:1.14.0'

testImplementation "junit:junit:$jUnitVersion"
testImplementation 'androidx.test:core:1.7.0'
testImplementation 'org.robolectric:robolectric:4.17'
testImplementation "org.mockito:mockito-core:$mockitoVersion"
testImplementation "org.mockito.kotlin:mockito-kotlin:$mockitoKotlinVersion"
testImplementation "io.mockk:mockk:$mockkVersion"
androidTestImplementation "androidx.test.ext:junit:$androidXTestVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidXEspressoTestVersion"
}

afterEvaluate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
package com.nextcloud.android.common.core.utils

import android.content.Context
import android.os.Build
import android.text.format.DateFormat
import com.nextcloud.android.common.core.R
import java.text.SimpleDateFormat
Expand All @@ -24,14 +23,7 @@ class DateFormatter(private val context: Context) {
private val sdfYears: SimpleDateFormat

init {
val locale =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
this.context.resources.configuration
.getLocales()
.get(0)
} else {
this.context.resources.configuration.locale
}
val locale = this.context.resources.configuration.locales[0]
this.sdfDays = SimpleDateFormat(DateFormat.getBestDateTimePattern(locale, "EEE"), locale)
this.sdfMonths =
SimpleDateFormat(DateFormat.getBestDateTimePattern(locale, "MMM d"), locale)
Expand Down
13 changes: 7 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ kotlin.code.style=official
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonFinalResIds=false
android.defaults.buildfeatures.resvalues=true
android.enableAppCompileTimeRClass=false
android.uniquePackageNames=false
android.dependency.useConstraints=true
android.r8.strictFullModeForKeepRules=false
android.newDsl=false

org.gradle.caching=true
org.gradle.parallel=true
org.gradle.configureondemand=true
org.gradle.daemon=true
org.gradle.configuration-cache=true
org.gradle.tooling.parallel=true
2 changes: 1 addition & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022-2023 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: MIT
jdk:
- openjdk17
- openjdk21
4 changes: 2 additions & 2 deletions material-color-utilities/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ plugins {
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

dependencies {
Expand Down
7 changes: 2 additions & 5 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}

buildFeatures {
Expand All @@ -47,7 +47,4 @@ dependencies {
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.11.0'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.11.0'
implementation project(path: ':ui')
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'
}
10 changes: 2 additions & 8 deletions ui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
namespace 'com.nextcloud.android.common.ui'

Expand Down Expand Up @@ -70,26 +70,20 @@ dependencies {
implementation("io.coil-kt.coil3:coil-network-okhttp:$coilVersion")
implementation("io.coil-kt.coil3:coil-svg:$coilVersion")

implementation("com.vanniktech:ui:0.10.0")

implementation 'androidx.core:core-ktx:1.19.1'
implementation 'androidx.appcompat:appcompat:1.8.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.3.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.7.0'

// region okhttp
implementation(platform("com.squareup.okhttp3:okhttp-bom:$okHttpVersion"))
implementation("com.squareup.okhttp3:okhttp")
implementation("com.squareup.okhttp3:logging-interceptor")
// endregion

implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinxSerializationVersion")

implementation project(':core')
api project(':material-color-utilities')

implementation 'androidx.preference:preference-ktx:1.2.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.2.0'
implementation 'com.google.android.material:material:1.14.0'

Expand Down
Loading