mirror of
https://github.com/tateisu/SubwayTooter
synced 2025-02-08 16:18:46 +01:00
AGP 8.0.0, Gradle 8.1, JDK17でkspがJava target levelを勘違いする問題の対策
This commit is contained in:
parent
8cb7fef71f
commit
49bd10561d
@ -24,14 +24,24 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility javaSourceCompatibility
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility javaTargetCompatibility
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = kotlinJvmTarget
|
jvmTarget = kotlinJvmTarget
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvmToolchain(kotlinJvmToolchain)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = kotlinJvmTarget
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
testImplementation "junit:junit:$junitVersion"
|
testImplementation "junit:junit:$junitVersion"
|
||||||
androidTestImplementation "androidx.test.ext:junit:$androidxTestExtJunitVersion"
|
androidTestImplementation "androidx.test.ext:junit:$androidxTestExtJunitVersion"
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
apply plugin: "java-library"
|
apply plugin: "java-library"
|
||||||
apply plugin: "kotlin"
|
apply plugin: "kotlin"
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = javaSourceCompatibility
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = javaTargetCompatibility
|
||||||
|
|
||||||
compileKotlin {
|
compileKotlin {
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = javaSourceCompatibility
|
||||||
targetCompatibility = JavaVersion.VERSION_1_8
|
targetCompatibility = javaTargetCompatibility
|
||||||
|
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = kotlinJvmTarget
|
jvmTarget = kotlinJvmTarget
|
||||||
|
@ -6,8 +6,8 @@ android {
|
|||||||
buildToolsVersion stBuildToolsVersion
|
buildToolsVersion stBuildToolsVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility javaSourceCompatibility
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility javaTargetCompatibility
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace "jp.juggler.apng"
|
namespace "jp.juggler.apng"
|
||||||
@ -38,6 +38,16 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvmToolchain(kotlinJvmToolchain)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = kotlinJvmTarget
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
@ -23,8 +23,8 @@ android {
|
|||||||
|
|
||||||
// exoPlayer 2.9.0 以降は Java 8 compiler support を要求する
|
// exoPlayer 2.9.0 以降は Java 8 compiler support を要求する
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility javaSourceCompatibility
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility javaTargetCompatibility
|
||||||
coreLibraryDesugaringEnabled true
|
coreLibraryDesugaringEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,6 +42,7 @@ android {
|
|||||||
|
|
||||||
buildFeatures {
|
buildFeatures {
|
||||||
viewBinding true
|
viewBinding true
|
||||||
|
buildConfig true
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
@ -150,6 +151,16 @@ android {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvmToolchain(kotlinJvmToolchain)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = kotlinJvmTarget
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static def gitBranch() {
|
static def gitBranch() {
|
||||||
def branch = "(no branch)"
|
def branch = "(no branch)"
|
||||||
def proc = "git status".execute()
|
def proc = "git status".execute()
|
||||||
|
@ -484,7 +484,7 @@ fun AppCompatActivity.setStatusBarColor(forceDark: Boolean = false) {
|
|||||||
var c = when {
|
var c = when {
|
||||||
forceDark -> Color.BLACK
|
forceDark -> Color.BLACK
|
||||||
else -> PrefI.ipStatusBarColor.value.notZero()
|
else -> PrefI.ipStatusBarColor.value.notZero()
|
||||||
?: attrColor(R.attr.colorPrimaryDark)
|
?: attrColor(android.R.attr.colorPrimaryDark)
|
||||||
}
|
}
|
||||||
setStatusBarColorCompat(c)
|
setStatusBarColorCompat(c)
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ fun Activity.openCustomTab(url: String?) {
|
|||||||
CustomTabsIntent.Builder()
|
CustomTabsIntent.Builder()
|
||||||
.setDefaultColorSchemeParams(
|
.setDefaultColorSchemeParams(
|
||||||
CustomTabColorSchemeParams.Builder()
|
CustomTabColorSchemeParams.Builder()
|
||||||
.setToolbarColor(attrColor(R.attr.colorPrimary))
|
.setToolbarColor(attrColor(android.R.attr.colorPrimary))
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
.setShowTitle(true)
|
.setShowTitle(true)
|
||||||
|
5
app/src/main/res/values/tag_ids.xml
Normal file
5
app/src/main/res/values/tag_ids.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<!-- ビューのタグのキーに使うID -->
|
||||||
|
<item type="id" name="text" />
|
||||||
|
</resources>
|
@ -15,6 +15,10 @@ android {
|
|||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildFeatures {
|
||||||
|
buildConfig true
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
@ -23,8 +27,8 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility javaSourceCompatibility
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility javaTargetCompatibility
|
||||||
coreLibraryDesugaringEnabled true
|
coreLibraryDesugaringEnabled true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,6 +45,16 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvmToolchain(kotlinJvmToolchain)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = kotlinJvmTarget
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// desugar_jdk_libs 2.0.0 は AGP 7.4.0-alpha10 以降を要求する
|
// desugar_jdk_libs 2.0.0 は AGP 7.4.0-alpha10 以降を要求する
|
||||||
//noinspection GradleDependency
|
//noinspection GradleDependency
|
||||||
|
@ -5,7 +5,6 @@ import io.github.inflationx.calligraphy3.CalligraphyConfig
|
|||||||
import io.github.inflationx.calligraphy3.CalligraphyInterceptor
|
import io.github.inflationx.calligraphy3.CalligraphyInterceptor
|
||||||
import io.github.inflationx.calligraphy3.CalligraphyTypefaceSpan
|
import io.github.inflationx.calligraphy3.CalligraphyTypefaceSpan
|
||||||
import io.github.inflationx.viewpump.ViewPump
|
import io.github.inflationx.viewpump.ViewPump
|
||||||
import jp.juggler.base.R
|
|
||||||
|
|
||||||
fun initializeFont() {
|
fun initializeFont() {
|
||||||
ViewPump.init(
|
ViewPump.init(
|
||||||
@ -13,7 +12,9 @@ fun initializeFont() {
|
|||||||
.addInterceptor(
|
.addInterceptor(
|
||||||
CalligraphyInterceptor(
|
CalligraphyInterceptor(
|
||||||
CalligraphyConfig.Builder()
|
CalligraphyConfig.Builder()
|
||||||
.setFontAttrId(R.attr.fontPath)
|
// AGP8で参照するRクラスが分割されてエラーになる。
|
||||||
|
// 指定する必要もないと思う…
|
||||||
|
// .setFontAttrId(R.attr.fontPath)
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -10,12 +10,15 @@ buildscript {
|
|||||||
ext.composeVersion = "1.0.5"
|
ext.composeVersion = "1.0.5"
|
||||||
ext.conscryptVersion = "2.5.2"
|
ext.conscryptVersion = "2.5.2"
|
||||||
ext.conscryptVersion = "2.5.2"
|
ext.conscryptVersion = "2.5.2"
|
||||||
ext.coreKtxVersion = "1.9.0"
|
ext.coreKtxVersion = "1.10.0"
|
||||||
ext.desugarLibVersion = "1.2.0"
|
ext.desugarLibVersion = "1.2.0"
|
||||||
ext.detektVersion = "1.22.0"
|
ext.detektVersion = "1.22.0"
|
||||||
ext.glideVersion = "4.14.2"
|
ext.glideVersion = "4.14.2"
|
||||||
|
ext.javaSourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
|
ext.javaTargetCompatibility = JavaVersion.VERSION_1_8
|
||||||
ext.junitVersion = "4.13.2"
|
ext.junitVersion = "4.13.2"
|
||||||
ext.koinVersion = "3.1.3"
|
ext.koinVersion = "3.1.3"
|
||||||
|
ext.kotlinJvmToolchain = 17
|
||||||
ext.kotlinJvmTarget = "1.8"
|
ext.kotlinJvmTarget = "1.8"
|
||||||
ext.kotlinVersion = "1.8.0"
|
ext.kotlinVersion = "1.8.0"
|
||||||
ext.kotlinxCoroutinesVersion = "1.6.4"
|
ext.kotlinxCoroutinesVersion = "1.6.4"
|
||||||
@ -34,7 +37,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:7.4.2'
|
classpath 'com.android.tools.build:gradle:8.0.0'
|
||||||
|
|
||||||
// room のバージョンの影響で google-services を上げられない場合がある
|
// room のバージョンの影響で google-services を上げられない場合がある
|
||||||
classpath "com.google.gms:google-services:4.3.15"
|
classpath "com.google.gms:google-services:4.3.15"
|
||||||
|
@ -5,6 +5,12 @@ android {
|
|||||||
compileSdkVersion stCompileSdkVersion
|
compileSdkVersion stCompileSdkVersion
|
||||||
buildToolsVersion stBuildToolsVersion
|
buildToolsVersion stBuildToolsVersion
|
||||||
|
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility javaSourceCompatibility
|
||||||
|
targetCompatibility javaTargetCompatibility
|
||||||
|
coreLibraryDesugaringEnabled true
|
||||||
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
targetSdkVersion stTargetSdkVersion
|
targetSdkVersion stTargetSdkVersion
|
||||||
minSdkVersion stMinSdkVersion
|
minSdkVersion stMinSdkVersion
|
||||||
@ -12,14 +18,9 @@ android {
|
|||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace 'com.jrummyapps.android.colorpicker'
|
||||||
resourcePrefix "cpv_"
|
resourcePrefix "cpv_"
|
||||||
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
|
||||||
coreLibraryDesugaringEnabled true
|
|
||||||
}
|
|
||||||
|
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = kotlinJvmTarget
|
jvmTarget = kotlinJvmTarget
|
||||||
freeCompilerArgs += [
|
freeCompilerArgs += [
|
||||||
@ -33,7 +34,16 @@ android {
|
|||||||
lint {
|
lint {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
}
|
}
|
||||||
namespace 'com.jrummyapps.android.colorpicker'
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvmToolchain(kotlinJvmToolchain)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = kotlinJvmTarget
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -6,8 +6,8 @@ android {
|
|||||||
buildToolsVersion stBuildToolsVersion
|
buildToolsVersion stBuildToolsVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility javaSourceCompatibility
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility javaTargetCompatibility
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
@ -28,3 +28,13 @@ android {
|
|||||||
}
|
}
|
||||||
namespace 'jp.juggler.emoji'
|
namespace 'jp.juggler.emoji'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvmToolchain(kotlinJvmToolchain)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = kotlinJvmTarget
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -29,5 +29,4 @@ android.useAndroidX=true
|
|||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
android.debug.obsoleteApi=true
|
android.debug.obsoleteApi=true
|
||||||
|
|
||||||
# generate signed APK するときにエラーを出すことがある
|
|
||||||
org.gradle.unsafe.configuration-cache=false
|
org.gradle.unsafe.configuration-cache=false
|
||||||
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
#Mon Jun 13 20:53:58 JST 2022
|
#Mon Jun 13 20:53:58 JST 2022
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
@ -21,10 +21,20 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility javaSourceCompatibility
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility javaTargetCompatibility
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = kotlinJvmTarget
|
jvmTarget = kotlinJvmTarget
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvmToolchain(kotlinJvmToolchain)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = kotlinJvmTarget
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -6,8 +6,8 @@ android {
|
|||||||
buildToolsVersion stBuildToolsVersion
|
buildToolsVersion stBuildToolsVersion
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
sourceCompatibility JavaVersion.VERSION_1_8
|
sourceCompatibility javaSourceCompatibility
|
||||||
targetCompatibility JavaVersion.VERSION_1_8
|
targetCompatibility javaTargetCompatibility
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
@ -48,6 +48,16 @@ android {
|
|||||||
namespace 'jp.juggler.apng.sample'
|
namespace 'jp.juggler.apng.sample'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
jvmToolchain(kotlinJvmToolchain)
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = kotlinJvmTarget
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$desugarLibVersion"
|
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$desugarLibVersion"
|
||||||
implementation project(":base")
|
implementation project(":base")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user