Skip to content

Commit

Permalink
chore(deps): Upgrade to AGP 8.5
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Niedermann <[email protected]>
  • Loading branch information
stefan-niedermann committed Jan 17, 2024
1 parent 46dec38 commit 26c6635
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 61 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
buildscript {
ext.version_code = 1008002
ext.version_name = '1.8.2'
ext.kotlin_version = '1.8.22'
ext.kotlin_version = '1.9.22'
ext.sso_version = '0.8.1'

repositories {
Expand All @@ -12,7 +12,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22"
}
}
Expand Down
22 changes: 12 additions & 10 deletions exception/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ apply plugin: 'kotlin-android'
apply plugin: 'maven-publish' // needed for JitPack.io

android {
compileSdkVersion 33
buildToolsVersion "33.0.1"
compileSdk 34
namespace 'it.niedermann.nextcloud.exception'

defaultConfig {
minSdkVersion 22
targetSdkVersion 33
versionCode version_code
versionName version_name
minSdk 22
targetSdk 34

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
}

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

kotlinOptions {
jvmTarget = '17'
}

testOptions {
Expand Down Expand Up @@ -55,11 +57,11 @@ dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'

api "com.github.nextcloud:Android-SingleSignOn:$sso_version"
implementation 'com.github.stefan-niedermann:android-commons:0.2.9'
implementation 'com.github.stefan-niedermann:android-commons:0.3.2'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

testImplementation 'junit:junit:4.13.2'
testImplementation "io.mockk:mockk:1.13.7"
testImplementation "io.mockk:mockk:1.13.9"
testImplementation 'org.robolectric:robolectric:4.11.1'
}
2 changes: 1 addition & 1 deletion exception/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<manifest package="it.niedermann.nextcloud.exception" />
<manifest />
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx4096m
org.gradle.jvmargs=-Xmx4096m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
Expand All @@ -17,4 +17,6 @@ org.gradle.jvmargs=-Xmx4096m
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
# Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.
android.disableAutomaticComponentCreation=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
22 changes: 12 additions & 10 deletions markdown/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,25 @@ apply plugin: 'kotlin-android'
apply plugin: 'maven-publish' // needed for JitPack.io

android {
compileSdkVersion 33
buildToolsVersion "33.0.1"
compileSdk 34
namespace 'it.niedermann.android.markdown'

defaultConfig {
minSdkVersion 22
targetSdkVersion 33
versionCode version_code
versionName version_name
minSdk 22
targetSdk 34

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
}

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

kotlinOptions {
jvmTarget = '17'
}

testOptions {
Expand All @@ -46,10 +48,10 @@ dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'

api "com.github.nextcloud:Android-SingleSignOn:$sso_version"
implementation 'com.github.stefan-niedermann:android-commons:0.2.9'
implementation 'com.github.stefan-niedermann:android-commons:0.3.2'

implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.lifecycle:lifecycle-livedata:2.6.2'
implementation 'androidx.lifecycle:lifecycle-livedata:2.7.0'

implementation 'org.jsoup:jsoup:1.17.2'

Expand Down
2 changes: 1 addition & 1 deletion markdown/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="it.niedermann.android.markdown">
<manifest>

</manifest>
19 changes: 12 additions & 7 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ plugins {
}

android {
compileSdk 34
namespace 'it.niedermann.nextcloud.sample'
compileSdk 33

defaultConfig {
applicationId "it.niedermann.nextcloud.sample"
minSdk 24
targetSdk 33
targetSdk 34
versionCode version_code
versionName version_name

Expand All @@ -24,23 +24,28 @@ android {
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
coreLibraryDesugaringEnabled true
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '1.8'
jvmTarget = '17'
}
}

dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'

implementation project(path: ':exception')
implementation project(path: ':markdown')
implementation project(path: ':sso-glide')
implementation 'androidx.core:core-ktx:1.10.1'

implementation 'androidx.core:core-ktx:1.12.0'
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'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package it.niedermann.nextcloud.sample

import android.content.Intent
import android.os.Bundle
import android.view.View
import android.widget.Button
import android.widget.TextView
import androidx.appcompat.app.AppCompatActivity
Expand All @@ -16,6 +17,7 @@ import it.niedermann.nextcloud.exception.ExceptionUtil
class MainActivity : AppCompatActivity() {

private lateinit var signOn: Button
private lateinit var currentUser: TextView
private lateinit var sampleException: TextView
private lateinit var markdownEditor: MarkdownEditor
private lateinit var markdownViewer: MarkdownEditor
Expand All @@ -26,6 +28,7 @@ class MainActivity : AppCompatActivity() {
setContentView(R.layout.activity_main)

signOn = findViewById<MaterialButton>(R.id.signOn)
currentUser = findViewById(R.id.currentUser)
sampleException = findViewById(R.id.sampleException)
markdownEditor = findViewById<MarkdownEditorImpl>(R.id.markdown_editor)
markdownViewer = findViewById<MarkdownViewerImpl>(R.id.markdown_viewer)
Expand All @@ -47,6 +50,8 @@ class MainActivity : AppCompatActivity() {
AccountImporter.onActivityResult(requestCode, resultCode, data, this) {
SingleAccountHelper.commitCurrentAccount(this, it.name)
mentions[it.userId] = it.name
currentUser.text = it.name
currentUser.visibility = View.VISIBLE
}
}
}
44 changes: 27 additions & 17 deletions sample/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,33 @@
android:orientation="vertical"
tools:context=".MainActivity">

<TextView
style="@style/TextAppearance.Material3.HeadlineLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/headline_exception" />

<com.google.android.material.button.MaterialButton
android:id="@+id/signOn"
android:text="@string/sign_on"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:text="@string/sign_on" />

<com.google.android.material.textview.MaterialTextView
android:id="@+id/currentUser"
style="?attr/textAppearanceBodyMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:visibility="gone"
tools:text="@tools:sample/full_names"
tools:visibility="visible" />

<com.google.android.material.textview.MaterialTextView
style="?attr/textAppearanceHeadlineLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/headline_exception" />

<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="150dp">

<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/sampleException"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -37,14 +47,14 @@
android:textColor="?attr/colorOnTertiaryContainer" />
</androidx.core.widget.NestedScrollView>

<TextView
style="@style/TextAppearance.Material3.HeadlineMedium"
<com.google.android.material.textview.MaterialTextView
style="?attr/textAppearanceHeadlineMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/headline_markdown" />

<TextView
style="@style/TextAppearance.Material3.HeadlineSmall"
<com.google.android.material.textview.MaterialTextView
style="?attr/textAppearanceHeadlineSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/headline_markdown_editor" />
Expand All @@ -54,8 +64,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<TextView
style="@style/TextAppearance.Material3.HeadlineSmall"
<com.google.android.material.textview.MaterialTextView
style="?attr/textAppearanceHeadlineSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/headline_markdown_viewer" />
Expand All @@ -65,8 +75,8 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />

<TextView
style="@style/TextAppearance.Material3.HeadlineMedium"
<com.google.android.material.textview.MaterialTextView
style="?attr/textAppearanceHeadlineMedium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/headline_sso_glide" />
Expand Down
20 changes: 11 additions & 9 deletions sso-glide/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,25 @@ apply plugin: 'kotlin-kapt'
apply plugin: 'maven-publish' // needed for JitPack.io

android {
compileSdkVersion 33
buildToolsVersion "33.0.1"
compileSdk 34
namespace 'it.niedermann.nextcloud.sso.glide'

defaultConfig {
minSdkVersion 22
targetSdkVersion 33
versionCode version_code
versionName version_name
minSdk 22
targetSdk 34

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'consumer-rules.pro'
}

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

kotlinOptions {
jvmTarget = '17'
}

testOptions {
Expand Down Expand Up @@ -61,7 +63,7 @@ dependencies {
kapt 'com.github.bumptech.glide:compiler:4.16.0'

testImplementation 'androidx.test:core:1.5.0'
testImplementation "io.mockk:mockk:1.13.7"
testImplementation "io.mockk:mockk:1.13.9"
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.robolectric:robolectric:4.11.1'
}
2 changes: 1 addition & 1 deletion sso-glide/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<manifest package="it.niedermann.nextcloud.sso.glide" />
<manifest />

0 comments on commit 26c6635

Please sign in to comment.