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
4 changes: 2 additions & 2 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: tests

steps:
- name: gplay
image: ghcr.io/nextcloud/continuous-integration-androidandroidbase:5
image: ghcr.io/nextcloud/continuous-integration-android8:3
environment:
LOG_USERNAME:
from_secret: LOG_USERNAME
Expand Down Expand Up @@ -46,7 +46,7 @@ name: analysis

steps:
- name: analysis
image: ghcr.io/nextcloud/continuous-integration-androidandroidbase:5
image: ghcr.io/nextcloud/continuous-integration-android8:3
environment:
GIT_USERNAME:
from_secret: GIT_USERNAME
Expand Down
10 changes: 3 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ buildscript {
}
repositories {
google()
maven {
url 'https://plugins.gradle.org/m2/'
}
maven { url 'https://plugins.gradle.org/m2/' }
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'gradle.plugin.com.github.spotbugs.snom:spotbugs-gradle-plugin:4.7.5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.23.4"
Expand All @@ -21,9 +19,7 @@ allprojects {
repositories {
google()
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
maven { url 'https://plugins.gradle.org/m2/' }
}
}

Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
android.useAndroidX=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
android.enableR8.fullMode=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Mar 10 15:14:55 CET 2023
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
2 changes: 1 addition & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
jdk: openjdk11
jdk: openjdk17
36 changes: 20 additions & 16 deletions lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ repositories {
google()
maven { url "https://jitpack.io" }
mavenCentral()
maven {
url 'https://plugins.gradle.org/m2/'
}
maven { url 'https://plugins.gradle.org/m2/' }
}

apply plugin: 'com.android.library'
Expand All @@ -27,10 +25,11 @@ configurations {

android {
namespace 'com.nextcloud.android.sso'
compileSdkVersion 31
compileSdk 34

defaultConfig {
minSdkVersion 21
targetSdkVersion 31
minSdk 21
targetSdk 34
consumerProguardFiles 'consumer-proguard-rules.pro'
}

Expand All @@ -47,41 +46,48 @@ android {

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

publishing {
singleVariant('release') {
withSourcesJar()
withJavadocJar()
}
}

productFlavors { }
productFlavors {}

lint {
abortOnError false
disable 'MissingTranslation', 'ExtraTranslation', 'MissingQuantity', 'InconsistentArrays', 'TypographyEllipsis', 'GradleDependency', 'VectorPath', 'IconMissingDensityFolder', 'IconDensities'
htmlOutput file("$project.buildDir/reports/lint/lint.html")
htmlOutput file("$project.layout.buildDirectory/reports/lint/lint.html")
htmlReport true
}

tasks.register("spotbugsDebugReport", SpotBugsTask) {
ignoreFailures = true
effort = "max"
reportLevel = "medium"
classes = fileTree("$project.buildDir/intermediates/javac/debug/classes/")
classes = fileTree("$project.layout.buildDirectory/intermediates/javac/debug/classes/")
excludeFilter = file("${project.rootDir}/spotbugs-filter.xml")

reports {
xml.enabled = false
html {
enabled = true
destination = file("$project.buildDir/reports/spotbugs/spotbugs.html")
destination = file("$project.layout.buildDirectory/reports/spotbugs/spotbugs.html")
}
}
}
}

task ktlint(type: JavaExec, group: "verification") {
tasks.register('ktlint', JavaExec) {
description = "Check Kotlin code style."
main = "com.pinterest.ktlint.Main"
classpath = configurations.ktlint
args "--reporter=plain", "--reporter=plain,output=${buildDir}/ktlint.txt,src/**/*.kt"
args "--reporter=plain", "--reporter=plain,output=${project.layout.buildDirectory}/ktlint.txt,src/**/*.kt"
}

detekt {
Expand Down Expand Up @@ -122,9 +128,7 @@ dependencies {

ktlint "com.pinterest:ktlint:0.51.0-FINAL"

// Required for local unit tests (JUnit 4 framework)
testImplementation 'junit:junit:4.13.2'
// required if you want to use Mockito for unit tests
testImplementation 'org.mockito:mockito-core:5.7.0'
}

Expand Down
15 changes: 7 additions & 8 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ apply plugin: 'com.android.application'

android {
namespace 'com.nextcloud.android.sso.sample'

compileSdkVersion 33
buildToolsVersion "32.0.0"
compileSdk 34

defaultConfig {
applicationId "com.nextcloud.android.sso.sample"
minSdkVersion 22
targetSdkVersion 33
minSdk 22
targetSdk 34
versionCode 1
versionName "1.0"

Expand All @@ -22,10 +20,11 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

compileOptions {
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

Expand All @@ -35,7 +34,7 @@ dependencies {

implementation project(path: ':lib')
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'

Expand Down