Migrate Gradle to KTS and version catalog, increase targetSDK
This commit is contained in:
parent
03620d2d0b
commit
22e355fce2
10 changed files with 85 additions and 86 deletions
|
|
@ -1,48 +0,0 @@
|
|||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(17)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'de.lukaspieper.gcam.services'
|
||||
compileSdk 34
|
||||
|
||||
defaultConfig {
|
||||
minSdk 19
|
||||
targetSdk 31
|
||||
versionCode 8
|
||||
versionName "1.5.2"
|
||||
}
|
||||
|
||||
flavorDimensions 'default'
|
||||
productFlavors {
|
||||
basic {
|
||||
dimension 'default'
|
||||
applicationId 'de.lukaspieper.gcam.services'
|
||||
}
|
||||
photos {
|
||||
dimension 'default'
|
||||
applicationId 'com.google.android.apps.photos'
|
||||
}
|
||||
photosonly {
|
||||
dimension 'default'
|
||||
applicationId 'com.google.android.apps.photos'
|
||||
}
|
||||
}
|
||||
|
||||
// No benefit outside of Google Play, disabled for IzzyOnDroid
|
||||
// https://github.com/lukaspieper/Gcam-Services-Provider/issues/122#issuecomment-1930811074
|
||||
dependenciesInfo {
|
||||
includeInApk false
|
||||
includeInBundle false
|
||||
}
|
||||
|
||||
// TODO: Upgrade targetSdk
|
||||
lintOptions {
|
||||
disable 'ExpiredTargetSdkVersion'
|
||||
}
|
||||
}
|
||||
43
app/build.gradle.kts
Normal file
43
app/build.gradle.kts
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(17)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "de.lukaspieper.gcam.services"
|
||||
compileSdk = 35
|
||||
|
||||
defaultConfig {
|
||||
minSdk = 19
|
||||
targetSdk = 35
|
||||
versionCode = 8
|
||||
versionName = "1.5.2"
|
||||
}
|
||||
|
||||
flavorDimensions.add("default")
|
||||
productFlavors {
|
||||
create("basic") {
|
||||
dimension = "default"
|
||||
applicationId = "de.lukaspieper.gcam.services"
|
||||
}
|
||||
create("photos") {
|
||||
dimension = "default"
|
||||
applicationId = "com.google.android.apps.photos"
|
||||
}
|
||||
create("photosonly") {
|
||||
dimension = "default"
|
||||
applicationId = "com.google.android.apps.photos"
|
||||
}
|
||||
}
|
||||
|
||||
// No benefit outside of Google Play, disabled for IzzyOnDroid
|
||||
// https://github.com/lukaspieper/Gcam-Services-Provider/issues/122#issuecomment-1930811074
|
||||
dependenciesInfo {
|
||||
includeInApk = false
|
||||
includeInBundle = false
|
||||
}
|
||||
}
|
||||
12
build.gradle
12
build.gradle
|
|
@ -1,12 +0,0 @@
|
|||
buildscript {
|
||||
ext.kotlin_version = '2.0.20'
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "com.android.application" version '8.7.0' apply false
|
||||
id "org.jetbrains.kotlin.android" version "$kotlin_version" apply false
|
||||
}
|
||||
|
||||
tasks.register('clean', Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
4
build.gradle.kts
Normal file
4
build.gradle.kts
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
}
|
||||
|
|
@ -4,19 +4,19 @@
|
|||
# any settings specified in this file.
|
||||
# For more details on how to configure your build environment visit
|
||||
# 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 -Dfile.encoding=UTF-8
|
||||
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. For more details, visit
|
||||
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
|
||||
# org.gradle.parallel=true
|
||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||
# Android operating system, and which are packaged with your app"s APK
|
||||
# Android operating system, and which are packaged with your app's APK
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
|
||||
# Enables namespacing of each library's R class so that its R class includes only the
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
|
|
|
|||
7
gradle/libs.versions.toml
Normal file
7
gradle/libs.versions.toml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[versions]
|
||||
agp = "8.8.0"
|
||||
kotlin = "2.1.10"
|
||||
|
||||
[plugins]
|
||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,7 +1,7 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=1541fa36599e12857140465f3c91a97409b4512501c26f9631fb113e392c5bd1
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip
|
||||
distributionSha256Sum=7a00d51fb93147819aab76024feece20b6b84e420694101f276be952e08bef03
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
|
|||
3
gradlew
vendored
3
gradlew
vendored
|
|
@ -86,8 +86,7 @@ done
|
|||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||
' "$PWD" ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name='Gcam Services Provider'
|
||||
include ':app'
|
||||
22
settings.gradle.kts
Normal file
22
settings.gradle.kts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
google {
|
||||
content {
|
||||
includeGroupByRegex("com\\.android.*")
|
||||
includeGroupByRegex("com\\.google.*")
|
||||
includeGroupByRegex("androidx.*")
|
||||
}
|
||||
}
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "Gcam Services Provider"
|
||||
include(":app")
|
||||
Loading…
Reference in a new issue