Merge pull request #526 from theimpulson/android13-dependencyUpdates

Android13 QPR2 Dependency & Misc Updates
This commit is contained in:
Aayush Gupta 2023-08-04 16:41:32 +08:00 committed by GitHub
commit da5205c0e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 129 additions and 110 deletions

View file

@ -7,29 +7,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Gradle dependency cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: ${{ runner.os }}-gradle-
- name: Checkout the code
uses: actions/checkout@v3
- name: Android build cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
~/.android/build-cache
key: ${{ runner.os }}-android
restore-keys: ${{ runner.os }}-android
- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'corretto'
java-version: 17
cache: 'gradle'
- name: Build
run: ./gradlew compileDebugAndroidTestSources check assemble ktlintCheck

View file

@ -1,7 +1,7 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "org.jlleitschuh.gradle.ktlint" version "10.2.0"
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'org.jlleitschuh.gradle.ktlint'
}
def gitDescribe = { ->
@ -14,12 +14,12 @@ def gitDescribe = { ->
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
namespace 'com.stevesoltys.seedvault'
compileSdk rootProject.ext.compileSdk
defaultConfig {
minSdkVersion 32 // leave at 32 for robolectric tests
targetSdkVersion rootProject.ext.targetSdkVersion
minSdk 32 // leave at 32 for robolectric tests
targetSdk rootProject.ext.targetSdk
versionNameSuffix "-$gitDescribe"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments disableAnalytics: 'true'
@ -31,7 +31,7 @@ android {
}
}
lintOptions {
lint {
disable "DialogFragmentCallbacksDetector",
"InvalidFragmentVersionForActivityResult",
"CheckedExceptions"
@ -43,7 +43,7 @@ android {
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
languageVersion = "1.6"
languageVersion = "1.7"
}
testOptions {
unitTests.all {

View file

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.stevesoltys.seedvault">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:extractNativeLibs="true" />
</manifest>

View file

@ -2,40 +2,31 @@ buildscript {
// 1.3.61 Android 11
// 1.4.30 Android 12
// 1.6.10 Android 13
// 1.7.20 Android 13 (QPR2)
// Check:
// https://android.googlesource.com/platform/external/kotlinc/+/refs/tags/android-13.0.0_r3/build.txt
ext.aosp_kotlin_version = '1.6.10' // 1.6.10-release-923 in AOSP
ext.kotlin_version = '1.6.10'
// https://android.googlesource.com/platform/external/kotlinc/+/refs/tags/android-13.0.0_r32/build.txt
ext.aosp_kotlin_version = '1.7.20' // 1.7.20-release-201 in AOSP
ext.kotlin_version = '1.7.20'
}
repositories {
mavenCentral()
google()
}
dependencies {
//noinspection DifferentKotlinGradleVersion
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.google.protobuf:protobuf-gradle-plugin:0.8.17"
classpath 'com.android.tools.build:gradle:7.2.2'
}
plugins {
id 'com.android.application' version '8.1.0' apply false
id 'com.android.library' version '8.1.0' apply false
id 'com.google.protobuf' version '0.9.4' apply false
id 'org.jetbrains.kotlin.android' version "$kotlin_version" apply false
id 'org.jetbrains.kotlin.kapt' version "$kotlin_version" apply false
id 'org.jetbrains.dokka' version "$kotlin_version" apply false
id 'org.jlleitschuh.gradle.ktlint' version '11.5.0' apply false
}
ext {
buildToolsVersion = '33.0.0'
compileSdkVersion = 33
minSdkVersion = 32
targetSdkVersion = 33
compileSdk = 33
minSdk = 32
targetSdk = 33
}
apply from: 'gradle/dependencies.gradle'
allprojects {
repositories {
mavenCentral()
google()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

View file

@ -3,17 +3,19 @@
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
namespace 'org.calyxos.backup.contacts'
compileSdk rootProject.ext.compileSdk
defaultConfig {
applicationId "org.calyxos.backup.contacts"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
minSdk rootProject.ext.minSdk
targetSdk rootProject.ext.targetSdk
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments disableAnalytics: 'true'

View file

@ -3,8 +3,7 @@
SPDX-FileCopyrightText: 2020 The Calyx Institute
SPDX-License-Identifier: Apache-2.0
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.calyxos.backup.contacts.test">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:extractNativeLibs="true" />

View file

@ -3,3 +3,5 @@ org.gradle.configureondemand=true
android.useAndroidX=true
android.enableJetifier=false
kotlin.code.style=official
android.nonTransitiveRClass=false
android.enableR8.fullMode=false

View file

@ -1,7 +1,7 @@
ext {
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#3901
ext.room_version = "2.4.0-alpha05"
// https://android.googlesource.com/platform/external/protobuf/+/refs/tags/android-13.0.0_r3/java/pom.xml#7
ext.room_version = "2.4.0-alpha05" // 2.5.0-alpha01 in AOSP but needs testing
// https://android.googlesource.com/platform/external/protobuf/+/refs/tags/android-13.0.0_r32/java/pom.xml#7
ext.protobuf_version = "3.9.1"
// test dependencies below - these do not care about AOSP and can be freely updated
@ -39,58 +39,58 @@ ext.kotlin_libs = [
],
coroutines: [
dependencies.create('org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm') {
// https://android.googlesource.com/platform/external/kotlinx.coroutines/+/refs/tags/android-13.0.0_r3/CHANGES.md
version { strictly '1.5.2' }
// https://android.googlesource.com/platform/external/kotlinx.coroutines/+/refs/tags/android-13.0.0_r32/CHANGES.md
version { strictly '1.6.4' }
},
dependencies.create('org.jetbrains.kotlinx:kotlinx-coroutines-android') {
// https://android.googlesource.com/platform/external/kotlinx.coroutines/+/refs/tags/android-13.0.0_r3/CHANGES.md
version { strictly '1.5.2' }
// https://android.googlesource.com/platform/external/kotlinx.coroutines/+/refs/tags/android-13.0.0_r32/CHANGES.md
version { strictly '1.6.4' }
},
],
]
ext.std_libs = [
androidx_core: [
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#1761
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/androidx/Android.bp#2275
dependencies.create('androidx.core:core') {
version { strictly '1.9.0-alpha03' }
version { strictly '1.9.0-alpha05' } // 1.9.0-alpha03 in AOSP but has SDK version issues
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#1727
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/androidx/Android.bp#2241
dependencies.create('androidx.core:core-ktx') {
version { strictly '1.9.0-alpha03' }
version { strictly '1.9.0-alpha05' } // 1.9.0-alpha03 in AOSP but has SDK version issues
},
],
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#2159
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/androidx/Android.bp#2705
androidx_fragment: dependencies.create('androidx.fragment:fragment-ktx') {
version { strictly '1.4.0-alpha09' }
version { strictly '1.5.0-alpha03' }
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#57
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/androidx/Android.bp#61
androidx_activity: dependencies.create('androidx.activity:activity-ktx') {
version { strictly '1.4.0-alpha02' }
version { strictly '1.5.0-alpha03' }
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#3597
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/androidx/Android.bp#4275
androidx_preference: dependencies.create('androidx.preference:preference') {
version { strictly '1.2.0-alpha01' }
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#2754
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#3376
androidx_lifecycle_viewmodel_ktx: dependencies.create('androidx.lifecycle:lifecycle-viewmodel-ktx') {
version { strictly '2.4.0-alpha03' } // 2.4.0-alpha04 in AOSP but was never released
version { strictly '2.5.0-alpha03' }
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#2550
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/androidx/Android.bp#3134
androidx_lifecycle_livedata_ktx: dependencies.create('androidx.lifecycle:lifecycle-livedata-ktx') {
version { strictly '2.4.0-alpha03' } // 2.4.0-alpha04 in AOSP but was never released
version { strictly '2.5.0-alpha03' }
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/extras/constraint-layout-x/Android.bp#39
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/extras/constraint-layout-x/Android.bp#64
androidx_constraintlayout: dependencies.create('androidx.constraintlayout:constraintlayout') {
version { strictly '2.0.0-beta7' }
version { strictly '2.2.0-alpha05' }
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/androidx/Android.bp#1865
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/androidx/Android.bp#2411
androidx_documentfile: dependencies.create('androidx.documentfile:documentfile') {
version { strictly '1.1.0-alpha01' } // 1.1.0-alpha02 in AOSP but not released yet
},
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r3/current/extras/material-design-x/Android.bp#6
// https://android.googlesource.com/platform/prebuilts/sdk/+/refs/tags/android-13.0.0_r32/current/extras/material-design-x/Android.bp#6
com_google_android_material: dependencies.create('com.google.android.material:material') {
version { strictly '1.6.0-alpha03' } // 1.6.0-alpha0301 in AOSP
version { strictly '1.7.0-alpha03' }
},
]

View file

@ -1,7 +1,7 @@
#Fri Aug 19 10:56:09 IST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
distributionSha256Sum=b586e04868a22fd817c8971330fec37e298f3242eb85c374181b12d637f80302
distributionSha256Sum=03ec176d388f2aa99defcadc3ac6adf8dd2bce5145a129659537c0874dea5ad1

View file

@ -1,3 +1,19 @@
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
rootProject.name = 'Seedvault'
include ':app'
include ':contactsbackup'
include ':storage:lib'

View file

@ -6,18 +6,18 @@
plugins {
id 'com.android.application'
id 'com.google.protobuf'
id 'kotlin-android'
id 'kotlin-kapt'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.kapt'
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
namespace 'de.grobox.storagebackuptester'
compileSdk rootProject.ext.compileSdk
defaultConfig {
applicationId "de.grobox.storagebackuptester"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
minSdk rootProject.ext.minSdk
targetSdk rootProject.ext.targetSdk
versionCode 20
versionName "0.9.7"
@ -37,17 +37,24 @@ android {
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
freeCompilerArgs += "-Xopt-in=kotlin.RequiresOptIn"
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
}
lintOptions {
lint {
disable "DialogFragmentCallbacksDetector",
"InvalidFragmentVersionForActivityResult"
}
packagingOptions {
exclude 'META-INF/*.kotlin_module'
exclude 'META-INF/androidx.*.version'
exclude 'META-INF/services/kotlin*'
exclude 'kotlin/internal/internal.kotlin_builtins'
jniLibs {
excludes += ['META-INF/services/kotlin*']
}
resources {
excludes += [
'META-INF/*.kotlin_module',
'META-INF/androidx.*.version',
'META-INF/services/kotlin*',
'kotlin/internal/internal.kotlin_builtins'
]
}
}
}

View file

@ -40,7 +40,7 @@ android_library {
enabled: false,
},
kotlincflags: [
"-Xopt-in=kotlin.RequiresOptIn",
"-opt-in=kotlin.RequiresOptIn",
],
}

View file

@ -6,19 +6,19 @@
plugins {
id 'com.android.library'
id 'com.google.protobuf'
id 'kotlin-android'
id 'kotlin-kapt'
id "org.jlleitschuh.gradle.ktlint" version "10.2.0"
id 'org.jetbrains.dokka' version "$kotlin_version"
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.kotlin.kapt'
id 'org.jetbrains.dokka'
id 'org.jlleitschuh.gradle.ktlint'
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
namespace 'org.calyxos.backup.storage'
compileSdk rootProject.ext.compileSdk
defaultConfig {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
minSdk rootProject.ext.minSdk
targetSdk rootProject.ext.targetSdk
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
testInstrumentationRunnerArguments disableAnalytics: 'true'
@ -38,14 +38,20 @@ android {
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
languageVersion = "1.6"
freeCompilerArgs += '-Xopt-in=kotlin.RequiresOptIn'
languageVersion = "1.7"
freeCompilerArgs += '-opt-in=kotlin.RequiresOptIn'
freeCompilerArgs += '-Xexplicit-api=strict'
}
protobuf {
protoc {
if ("aarch64" == System.getProperty("os.arch")) {
// mac m1
artifact = "com.google.protobuf:protoc:$protobuf_version:osx-x86_64"
} else {
// other
artifact = "com.google.protobuf:protoc:$protobuf_version"
}
}
generateProtoTasks {
all().each { task ->
task.builtins {
@ -56,7 +62,7 @@ android {
}
}
}
lintOptions {
lint {
disable "DialogFragmentCallbacksDetector",
"InvalidFragmentVersionForActivityResult",
"CheckedExceptions"

View file

@ -24,3 +24,6 @@
#-renamesourcefileattribute SourceFile
-keep class org.calyxos.backup.storage.** {*;}
# Ignore StringConcatFactory
-dontwarn java.lang.invoke.StringConcatFactory