build.gradle.kts 移行
This commit is contained in:
parent
b1ff4946b2
commit
2ae268b2aa
|
@ -3,14 +3,20 @@
|
|||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="1.8">
|
||||
<module name="apng" target="1.7" />
|
||||
<module name="SubwayTooter" target="17" />
|
||||
<module name="SubwayTooter.anko" target="17" />
|
||||
<module name="SubwayTooter.apng_android" target="17" />
|
||||
<module name="SubwayTooter.app" target="17" />
|
||||
<module name="SubwayTooter.base" target="17" />
|
||||
<module name="SubwayTooter.buildSrc" target="17" />
|
||||
<module name="SubwayTooter.buildSrc.main" target="17" />
|
||||
<module name="SubwayTooter.buildSrc.test" target="17" />
|
||||
<module name="SubwayTooter.colorpicker" target="17" />
|
||||
<module name="SubwayTooter.emoji" target="17" />
|
||||
<module name="SubwayTooter.icon_material_symbols" target="17" />
|
||||
<module name="SubwayTooter.main" target="17" />
|
||||
<module name="SubwayTooter.sample_apng" target="17" />
|
||||
<module name="SubwayTooter.test" target="17" />
|
||||
</bytecodeTargetLevel>
|
||||
</component>
|
||||
</project>
|
|
@ -16,6 +16,7 @@
|
|||
<option value="$PROJECT_DIR$/apng_android" />
|
||||
<option value="$PROJECT_DIR$/app" />
|
||||
<option value="$PROJECT_DIR$/base" />
|
||||
<option value="$PROJECT_DIR$/buildSrc" />
|
||||
<option value="$PROJECT_DIR$/colorpicker" />
|
||||
<option value="$PROJECT_DIR$/emoji" />
|
||||
<option value="$PROJECT_DIR$/icon_material_symbols" />
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/base/SubwayTooter.base.iml" filepath="$PROJECT_DIR$/.idea/modules/base/SubwayTooter.base.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/base/SubwayTooter.base.main.iml" filepath="$PROJECT_DIR$/.idea/modules/base/SubwayTooter.base.main.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/base/SubwayTooter.base.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/base/SubwayTooter.base.unitTest.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/SubwayTooter.buildSrc.iml" filepath="$PROJECT_DIR$/.idea/modules/SubwayTooter.buildSrc.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/SubwayTooter.buildSrc.main.iml" filepath="$PROJECT_DIR$/.idea/modules/SubwayTooter.buildSrc.main.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/SubwayTooter.buildSrc.test.iml" filepath="$PROJECT_DIR$/.idea/modules/SubwayTooter.buildSrc.test.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/colorpicker/SubwayTooter.colorpicker.iml" filepath="$PROJECT_DIR$/.idea/modules/colorpicker/SubwayTooter.colorpicker.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/colorpicker/SubwayTooter.colorpicker.main.iml" filepath="$PROJECT_DIR$/.idea/modules/colorpicker/SubwayTooter.colorpicker.main.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/colorpicker/SubwayTooter.colorpicker.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/colorpicker/SubwayTooter.colorpicker.unitTest.iml" />
|
||||
|
@ -28,10 +31,12 @@
|
|||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/icon_material_symbols/SubwayTooter.icon_material_symbols.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/icon_material_symbols/SubwayTooter.icon_material_symbols.androidTest.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/icon_material_symbols/SubwayTooter.icon_material_symbols.main.iml" filepath="$PROJECT_DIR$/.idea/modules/icon_material_symbols/SubwayTooter.icon_material_symbols.main.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/icon_material_symbols/SubwayTooter.icon_material_symbols.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/icon_material_symbols/SubwayTooter.icon_material_symbols.unitTest.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/SubwayTooter.main.iml" filepath="$PROJECT_DIR$/.idea/modules/SubwayTooter.main.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/sample_apng/SubwayTooter.sample_apng.iml" filepath="$PROJECT_DIR$/.idea/modules/sample_apng/SubwayTooter.sample_apng.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/sample_apng/SubwayTooter.sample_apng.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/sample_apng/SubwayTooter.sample_apng.androidTest.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/sample_apng/SubwayTooter.sample_apng.main.iml" filepath="$PROJECT_DIR$/.idea/modules/sample_apng/SubwayTooter.sample_apng.main.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/sample_apng/SubwayTooter.sample_apng.unitTest.iml" filepath="$PROJECT_DIR$/.idea/modules/sample_apng/SubwayTooter.sample_apng.unitTest.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/SubwayTooter.test.iml" filepath="$PROJECT_DIR$/.idea/modules/SubwayTooter.test.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/anko/mastodon-related.SubwayTooter.anko.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/anko/mastodon-related.SubwayTooter.anko.androidTest.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/apng_android/mastodon-related.SubwayTooter.apng_android.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/apng_android/mastodon-related.SubwayTooter.apng_android.androidTest.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/modules/app/mastodon-related.SubwayTooter.app.androidTest.iml" filepath="$PROJECT_DIR$/.idea/modules/app/mastodon-related.SubwayTooter.app.androidTest.iml" />
|
||||
|
|
|
@ -1,54 +0,0 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id "com.android.library"
|
||||
id "org.jetbrains.kotlin.android"
|
||||
}
|
||||
|
||||
android {
|
||||
namespace "jp.juggler.anko"
|
||||
|
||||
compileSdk(stCompileSdkVersion)
|
||||
setBuildToolsVersion(stBuildToolsVersion)
|
||||
|
||||
defaultConfig {
|
||||
minSdk stMinSdkVersion
|
||||
targetSdk stTargetSdkVersion
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility javaSourceCompatibility
|
||||
targetCompatibility javaTargetCompatibility
|
||||
}
|
||||
kotlin {
|
||||
jvmToolchain(kotlinJvmToolchain)
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
tasks.withType(KotlinCompile).configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation "junit:junit:$junitVersion"
|
||||
androidTestImplementation "androidx.test.ext:junit:$androidxTestExtJunitVersion"
|
||||
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxTestEspressoCoreVersion"
|
||||
|
||||
implementation "androidx.appcompat:appcompat:$appcompatVersion"
|
||||
implementation "androidx.core:core-ktx:$coreKtxVersion"
|
||||
implementation "androidx.preference:preference-ktx:$preferenceKtxVersion"
|
||||
implementation "com.google.android.material:material:$materialVersion"
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "jp.juggler.anko"
|
||||
|
||||
compileSdk = Vers.stCompileSdkVersion
|
||||
buildToolsVersion = Vers.stBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdk = Vers.stMinSdkVersion
|
||||
targetSdk = Vers.stTargetSdkVersion
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro",
|
||||
)
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = Vers.javaSourceCompatibility
|
||||
targetCompatibility = Vers.javaTargetCompatibility
|
||||
}
|
||||
kotlin {
|
||||
jvmToolchain(Vers.kotlinJvmToolchain)
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
}
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testImplementation("junit:junit:${Vers.junitVersion}")
|
||||
androidTestImplementation("androidx.test.ext:junit:${Vers.androidxTestExtJunitVersion}")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:${Vers.androidxTestEspressoCoreVersion}")
|
||||
|
||||
implementation("androidx.appcompat:appcompat:${Vers.appcompatVersion}")
|
||||
implementation("androidx.core:core-ktx:${Vers.coreKtxVersion}")
|
||||
implementation("androidx.preference:preference-ktx:${Vers.preferenceKtxVersion}")
|
||||
implementation("com.google.android.material:material:${Vers.materialVersion}")
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
apply plugin: "java-library"
|
||||
apply plugin: "kotlin"
|
||||
|
||||
sourceCompatibility = javaSourceCompatibility
|
||||
targetCompatibility = javaTargetCompatibility
|
||||
|
||||
compileKotlin {
|
||||
|
||||
sourceCompatibility = javaSourceCompatibility
|
||||
targetCompatibility = javaTargetCompatibility
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
freeCompilerArgs += [
|
||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
//noinspection DifferentStdlibGradleVersion
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib"
|
||||
|
||||
testImplementation "junit:junit:$junitVersion"
|
||||
testImplementation "org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion"
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("org.jetbrains.kotlin.jvm") version Vers.kotlinVersion
|
||||
`java-library`
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = Vers.javaSourceCompatibility
|
||||
targetCompatibility = Vers.javaTargetCompatibility
|
||||
}
|
||||
|
||||
val compileKotlin: KotlinCompile by tasks
|
||||
val compileTestKotlin: KotlinCompile by tasks
|
||||
|
||||
compileKotlin.kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
freeCompilerArgs = listOf(
|
||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||
)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(fileTree(mapOf("dir" to "libs", "include" to arrayOf("*.jar"))))
|
||||
testImplementation("junit:junit:${Vers.junitVersion}")
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:${Vers.kotlinVersion}")
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id "org.jetbrains.kotlin.android"
|
||||
}
|
||||
|
||||
android {
|
||||
namespace "jp.juggler.apng"
|
||||
compileSdk(stCompileSdkVersion)
|
||||
setBuildToolsVersion(stBuildToolsVersion)
|
||||
|
||||
defaultConfig {
|
||||
minSdk(stMinSdkVersion)
|
||||
targetSdk(stTargetSdkVersion)
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility javaSourceCompatibility
|
||||
targetCompatibility javaTargetCompatibility
|
||||
coreLibraryDesugaringEnabled true
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
freeCompilerArgs += [
|
||||
// "-opt-in=kotlin.ExperimentalStdlibApi",
|
||||
// "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
// "-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
|
||||
// "-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
|
||||
// "-opt-in=androidx.compose.animation.ExperimentalAnimationApi",
|
||||
]
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(kotlinJvmToolchain)
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
tasks.withType(KotlinCompile).configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api project(":apng")
|
||||
implementation project(":base")
|
||||
|
||||
testImplementation "junit:junit:$junitVersion"
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "jp.juggler.apng"
|
||||
compileSdk = Vers.stCompileSdkVersion
|
||||
buildToolsVersion = Vers.stBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdk = Vers.stMinSdkVersion
|
||||
targetSdk = Vers.stTargetSdkVersion
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android.txt"),
|
||||
"proguard-rules.pro",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = Vers.javaSourceCompatibility
|
||||
targetCompatibility = Vers.javaTargetCompatibility
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
freeCompilerArgs = listOf(
|
||||
// "-opt-in=kotlin.ExperimentalStdlibApi",
|
||||
// "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
// "-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
|
||||
// "-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
|
||||
// "-opt-in=androidx.compose.animation.ExperimentalAnimationApi",
|
||||
)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain( Vers.kotlinJvmToolchain)
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
}
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
api(project(":apng"))
|
||||
implementation(project(":base"))
|
||||
|
||||
testImplementation("junit:junit:${Vers.junitVersion}")
|
||||
}
|
307
app/build.gradle
307
app/build.gradle
|
@ -1,307 +0,0 @@
|
|||
import io.gitlab.arturbosch.detekt.Detekt
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.regex.Pattern
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("org.jetbrains.kotlin.plugin.serialization")
|
||||
id("com.google.devtools.ksp")
|
||||
id("io.gitlab.arturbosch.detekt")
|
||||
}
|
||||
|
||||
def keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||
def keystoreProperties = new Properties()
|
||||
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
|
||||
|
||||
android {
|
||||
namespace "jp.juggler.subwaytooter"
|
||||
|
||||
compileSdk(stCompileSdkVersion)
|
||||
setBuildToolsVersion(stBuildToolsVersion)
|
||||
|
||||
defaultConfig {
|
||||
targetSdk(stTargetSdkVersion)
|
||||
minSdk(stMinSdkVersion)
|
||||
|
||||
versionCode 539
|
||||
versionName "5.539"
|
||||
applicationId "jp.juggler.subwaytooter"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
}
|
||||
|
||||
// exoPlayer 2.9.0 以降は Java 8 compiler support を要求する
|
||||
compileOptions {
|
||||
sourceCompatibility javaSourceCompatibility
|
||||
targetCompatibility javaTargetCompatibility
|
||||
coreLibraryDesugaringEnabled true
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
freeCompilerArgs += [
|
||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
|
||||
"-opt-in=androidx.media3.common.util.UnstableApi"
|
||||
// "-Xopt-in=androidx.compose.foundation.ExperimentalFoundationApi",
|
||||
// "-Xopt-in=androidx.compose.animation.ExperimentalAnimationApi",
|
||||
]
|
||||
}
|
||||
|
||||
// kotlin 1.6.0にすると This version (1.0.5) of the Compose Compiler requires Kotlin version 1.5.31 but you appear to be using Kotlin version 1.6.0 which is not known to be compatible. と怒られる
|
||||
// buildFeatures {
|
||||
// compose true
|
||||
// }
|
||||
// composeOptions {
|
||||
// kotlinCompilerExtensionVersion compose_version
|
||||
// }
|
||||
|
||||
signingConfigs {
|
||||
release {
|
||||
storeFile file(keystoreProperties['storeFile'])
|
||||
storePassword keystoreProperties['storePassword']
|
||||
keyAlias keystoreProperties['keyAlias']
|
||||
keyPassword keystoreProperties['keyPassword']
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||
|
||||
lintOptions {
|
||||
disable "MissingTranslation"
|
||||
}
|
||||
signingConfig signingConfigs.release
|
||||
}
|
||||
debug {
|
||||
}
|
||||
}
|
||||
|
||||
// Specifies comma-separated list of flavor dimensions.
|
||||
flavorDimensions "fcmType"
|
||||
|
||||
productFlavors {
|
||||
nofcm {
|
||||
dimension "fcmType"
|
||||
versionNameSuffix "-noFcm"
|
||||
applicationIdSuffix ".noFcm"
|
||||
manifestPlaceholders = [customScheme: "subwaytooternofcm"]
|
||||
}
|
||||
fcm {
|
||||
dimension "fcmType"
|
||||
manifestPlaceholders = [customScheme: "subwaytooter"]
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/tateisu/SubwayTooter/issues/229
|
||||
// splits {
|
||||
// abi {
|
||||
// enable true
|
||||
// reset()
|
||||
// include "arm64-v8a", "x86", "x86_64"
|
||||
// universalApk true
|
||||
// }
|
||||
// }
|
||||
|
||||
// Generate Signed APK のファイル名を変更
|
||||
android.applicationVariants.all { variant ->
|
||||
if (variant.buildType.name == "release") {
|
||||
variant.outputs.all { output ->
|
||||
// Rename APK
|
||||
def versionCode = defaultConfig.versionCode
|
||||
def versionName = defaultConfig.versionName
|
||||
def flavor = variant.flavorName
|
||||
// def abi = output.getFilter("ABI") ?: "all"
|
||||
def date = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date())
|
||||
def branch = providers.exec {
|
||||
commandLine("git", "rev-parse", "--abbrev-ref", "HEAD")
|
||||
}.standardOutput.asText.get()?.trim() ?: "(no branch)"
|
||||
|
||||
outputFileName = "SubwayTooter-${branch}-${flavor}-${versionCode}-${versionName}-${date}.apk"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
resources {
|
||||
excludes += ["/META-INF/{AL2.0,LGPL2.1}", "META-INF/DEPENDENCIES"]
|
||||
// https://github.com/Kotlin/kotlinx.coroutines/issues/1064
|
||||
pickFirsts += ["META-INF/atomicfu.kotlin_module"]
|
||||
}
|
||||
}
|
||||
|
||||
useLibrary "android.test.base"
|
||||
useLibrary "android.test.mock"
|
||||
lint {
|
||||
warning "DuplicatePlatformClasses"
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(kotlinJvmToolchain)
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
tasks.withType(KotlinCompile).configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
// desugar_jdk_libs 2.0.0 は AGP 7.4.0-alpha10 以降を要求する
|
||||
//noinspection GradleDependency
|
||||
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$desugarLibVersion"
|
||||
|
||||
implementation project(":base")
|
||||
implementation project(":colorpicker")
|
||||
implementation project(":emoji")
|
||||
implementation project(":apng_android")
|
||||
implementation project(":anko")
|
||||
implementation fileTree(include: ["*.aar"], dir: "src/main/libs")
|
||||
|
||||
fcmImplementation "com.google.firebase:firebase-messaging:23.2.0"
|
||||
fcmImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-play-services:$kotlinxCoroutinesVersion"
|
||||
|
||||
// implementation "org.conscrypt:conscrypt-android:$conscryptVersion"
|
||||
api "org.conscrypt:conscrypt-android:$conscryptVersion"
|
||||
implementation "com.github.UnifiedPush:android-connector:2.1.1"
|
||||
implementation "jp.wasabeef:glide-transformations:4.3.0"
|
||||
|
||||
implementation 'com.github.androidmads:QRGenerator:1.0.1'
|
||||
|
||||
def apng4AndroidVersion = '2.25.0'
|
||||
implementation "com.github.penfeizhou.android.animation:apng:$apng4AndroidVersion"
|
||||
|
||||
ksp "com.github.bumptech.glide:ksp:$glideVersion"
|
||||
|
||||
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:$detektVersion")
|
||||
|
||||
testImplementation(project(":base"))
|
||||
androidTestImplementation(project(":base"))
|
||||
|
||||
androidTestApi "androidx.test.espresso:espresso-core:$androidxTestEspressoCoreVersion"
|
||||
androidTestApi "androidx.test.ext:junit-ktx:1.1.5"
|
||||
androidTestApi "androidx.test.ext:junit:$androidxTestExtJunitVersion"
|
||||
androidTestApi "androidx.test.ext:truth:1.5.0"
|
||||
androidTestApi "androidx.test:core-ktx:$testKtxVersion"
|
||||
androidTestApi "androidx.test:core:$androidxTestVersion"
|
||||
androidTestApi "androidx.test:runner:1.5.2"
|
||||
androidTestApi "org.jetbrains.kotlin:kotlin-test:$kotlinTestVersion"
|
||||
androidTestApi "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinxCoroutinesVersion"
|
||||
testApi "androidx.arch.core:core-testing:$archVersion"
|
||||
testApi "junit:junit:$junitVersion"
|
||||
testApi "org.jetbrains.kotlin:kotlin-test:$kotlinTestVersion"
|
||||
testApi "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinxCoroutinesVersion"
|
||||
|
||||
// To use android test orchestrator
|
||||
androidTestUtil "androidx.test:orchestrator:1.4.2"
|
||||
|
||||
testApi("com.squareup.okhttp3:mockwebserver:$okhttpVersion") {
|
||||
exclude group: "com.squareup.okio", module: "okio"
|
||||
exclude group: "com.squareup.okhttp3", module: "okhttp"
|
||||
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib-common"
|
||||
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib"
|
||||
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib-jdk8"
|
||||
}
|
||||
androidTestApi("com.squareup.okhttp3:mockwebserver:$okhttpVersion") {
|
||||
exclude group: "com.squareup.okio", module: "okio"
|
||||
exclude group: "com.squareup.okhttp3", module: "okhttp"
|
||||
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib-common"
|
||||
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib"
|
||||
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib-jdk8"
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
def willApplyGoogleService() {
|
||||
def gradle = getGradle()
|
||||
String taskRequestsString = gradle.getStartParameter().getTaskRequests().toString()
|
||||
|
||||
def isMatch = Pattern.compile(
|
||||
"(assemble|generate|connected)Fcm",
|
||||
).matcher(taskRequestsString).find()
|
||||
|
||||
println "willApplyGoogleService=$isMatch. $taskRequestsString"
|
||||
return isMatch
|
||||
}
|
||||
|
||||
if (willApplyGoogleService()) apply plugin: "com.google.gms.google-services"
|
||||
|
||||
|
||||
tasks.register("detektAll", Detekt) {
|
||||
description = "Custom DETEKT build for all modules"
|
||||
|
||||
// activate all available (even unstable) rules.
|
||||
allRules = false
|
||||
|
||||
// a way of suppressing issues before introducing detekt
|
||||
// baseline = file("$rootDir/config/detekt/baseline.xml")
|
||||
|
||||
parallel = true
|
||||
ignoreFailures = false
|
||||
autoCorrect = false
|
||||
|
||||
// preconfigure defaults
|
||||
buildUponDefaultConfig = true
|
||||
|
||||
def configFile = files("$rootDir/config/detekt/config.yml")
|
||||
config.setFrom(configFile)
|
||||
|
||||
def baselineFile = file("$rootDir/config/detekt/baseline.xml")
|
||||
if (baselineFile.isFile()) {
|
||||
baseline.set(baselineFile)
|
||||
}
|
||||
|
||||
source = files(
|
||||
"$rootDir/anko/src",
|
||||
"$rootDir/apng/src",
|
||||
"$rootDir/apng_android/src",
|
||||
"$rootDir/app/src",
|
||||
"$rootDir/base/src",
|
||||
"$rootDir/colorpicker/src",
|
||||
"$rootDir/emoji/src",
|
||||
"$rootDir/icon_material_symbols/src",
|
||||
"$rootDir/sample_apng/src",
|
||||
)
|
||||
|
||||
// def kotlinFiles = "**/*.kt"
|
||||
// include(kotlinFiles)
|
||||
|
||||
def resourceFiles = "**/resources/**"
|
||||
def buildFiles = "**/build/**"
|
||||
exclude(resourceFiles, buildFiles)
|
||||
reports {
|
||||
html.enabled = true
|
||||
xml.enabled = false
|
||||
txt.enabled = false
|
||||
|
||||
xml.required.set(true)
|
||||
xml.outputLocation = file("$buildDir/reports/detekt/st-${name}.xml")
|
||||
html.required.set(true)
|
||||
html.outputLocation = file("$buildDir/reports/detekt/st-${name}.html")
|
||||
txt.required.set(true)
|
||||
txt.outputLocation = file("$buildDir/reports/detekt/st-${name}.txt")
|
||||
sarif.required.set(true)
|
||||
sarif.outputLocation = file("$buildDir/reports/detekt/st-${name}.sarif")
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,344 @@
|
|||
|
||||
import com.android.build.gradle.api.ApplicationVariant
|
||||
import com.android.build.gradle.api.BaseVariantOutput
|
||||
|
||||
import com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
||||
import io.gitlab.arturbosch.detekt.Detekt
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
import java.io.FileInputStream
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("org.jetbrains.kotlin.plugin.serialization")
|
||||
id("com.google.devtools.ksp")
|
||||
id("io.gitlab.arturbosch.detekt")
|
||||
}
|
||||
|
||||
val keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||
val keystoreProperties = Properties().apply {
|
||||
load(FileInputStream(keystorePropertiesFile))
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "jp.juggler.subwaytooter"
|
||||
|
||||
compileSdk = Vers.stCompileSdkVersion
|
||||
buildToolsVersion = Vers.stBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
targetSdk = Vers.stTargetSdkVersion
|
||||
minSdk = Vers.stMinSdkVersion
|
||||
versionCode = 539
|
||||
versionName = "5.539"
|
||||
applicationId = "jp.juggler.subwaytooter"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
viewBinding = true
|
||||
}
|
||||
|
||||
// exoPlayer 2.9.0 以降は Java 8 compiler support を要求する
|
||||
compileOptions {
|
||||
sourceCompatibility = Vers.javaSourceCompatibility
|
||||
targetCompatibility = Vers.javaTargetCompatibility
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
freeCompilerArgs = listOf(
|
||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
|
||||
"-opt-in=androidx.media3.common.util.UnstableApi",
|
||||
// "-Xopt-in=androidx.compose.foundation.ExperimentalFoundationApi",
|
||||
// "-Xopt-in=androidx.compose.animation.ExperimentalAnimationApi",
|
||||
)
|
||||
}
|
||||
|
||||
// kotlin 1.6.0にすると This version (1.0.5) of the Compose Compiler requires Kotlin version 1.5.31 but you appear to be using Kotlin version 1.6.0 which is not known to be compatible. と怒られる
|
||||
// buildFeatures {
|
||||
// compose true
|
||||
// }
|
||||
// composeOptions {
|
||||
// kotlinCompilerExtensionVersion compose_version
|
||||
// }
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
storeFile = file(keystoreProperties["storeFile"] as String)
|
||||
storePassword = keystoreProperties["storePassword"] as String
|
||||
keyAlias = keystoreProperties["keyAlias"] as String
|
||||
keyPassword = keystoreProperties["keyPassword"] as String
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
isShrinkResources = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android.txt"),
|
||||
"proguard-rules.pro",
|
||||
)
|
||||
|
||||
lintOptions {
|
||||
disable("MissingTranslation")
|
||||
}
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
debug {
|
||||
}
|
||||
}
|
||||
|
||||
// Specifies comma-separated list of flavor dimensions.
|
||||
flavorDimensions += "fcmType"
|
||||
|
||||
productFlavors {
|
||||
create("nofcm") {
|
||||
dimension = "fcmType"
|
||||
versionNameSuffix = "-noFcm"
|
||||
applicationIdSuffix = ".noFcm"
|
||||
manifestPlaceholders["customScheme"] = "subwaytooternofcm"
|
||||
}
|
||||
create("fcm") {
|
||||
dimension = "fcmType"
|
||||
manifestPlaceholders["customScheme"] = "subwaytooter"
|
||||
}
|
||||
}
|
||||
|
||||
// https://github.com/tateisu/SubwayTooter/issues/229
|
||||
// splits {
|
||||
// abi {
|
||||
// enable true
|
||||
// reset()
|
||||
// include "arm64-v8a", "x86", "x86_64"
|
||||
// universalApk true
|
||||
// }
|
||||
// }
|
||||
|
||||
// Generate Signed APK のファイル名を変更
|
||||
applicationVariants.all(object : Action<ApplicationVariant> {
|
||||
override fun execute(variant: ApplicationVariant) {
|
||||
println("variant: ${variant}")
|
||||
|
||||
// Rename APK
|
||||
val versionCode = defaultConfig.versionCode
|
||||
val versionName = defaultConfig.versionName
|
||||
val flavor = variant.flavorName
|
||||
// val abi = output.getFilter("ABI") ?: "all"
|
||||
val date = SimpleDateFormat("yyyyMMdd_HHmmss").format(Date())
|
||||
val branch = providers.exec {
|
||||
commandLine("git", "rev-parse", "--abbrev-ref", "HEAD")
|
||||
}.standardOutput.asText.get()?.trim() ?: "(no branch)"
|
||||
|
||||
variant.outputs.all(object : Action<BaseVariantOutput> {
|
||||
override fun execute(output: BaseVariantOutput) {
|
||||
val outputImpl = output as BaseVariantOutputImpl
|
||||
outputImpl.outputFileName =
|
||||
"SubwayTooter-${branch}-${flavor}-${versionCode}-${versionName}-${date}.apk"
|
||||
println("output file name: ${outputImpl.outputFileName}")
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
android.applicationVariants.all { variant ->
|
||||
if (variant.buildType.name == "release") {
|
||||
variant.outputs.all { output ->
|
||||
|
||||
true
|
||||
}
|
||||
}
|
||||
true
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
resources {
|
||||
excludes.addAll(
|
||||
listOf(
|
||||
"/META-INF/{AL2.0,LGPL2.1}",
|
||||
"META-INF/DEPENDENCIES",
|
||||
)
|
||||
)
|
||||
// https://github.com/Kotlin/kotlinx.coroutines/issues/1064
|
||||
pickFirsts.addAll(
|
||||
listOf(
|
||||
"META-INF/atomicfu.kotlin_module",
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
useLibrary("android.test.base")
|
||||
useLibrary("android.test.mock")
|
||||
lint {
|
||||
warning += "DuplicatePlatformClasses"
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(Vers.kotlinJvmToolchain)
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
}
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dependencies {
|
||||
|
||||
// desugar_jdk_libs 2.0.0 は AGP 7.4.0-alpha10 以降を要求する
|
||||
//noinspection GradleDependency
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:${Vers.desugarLibVersion}")
|
||||
|
||||
implementation(project(":base"))
|
||||
implementation(project(":colorpicker"))
|
||||
implementation(project(":emoji"))
|
||||
implementation(project(":apng_android"))
|
||||
implementation(project(":anko"))
|
||||
implementation(fileTree(mapOf("dir" to "src/main/libs", "include" to arrayOf("*.aar"))))
|
||||
|
||||
"fcmImplementation"("com.google.firebase:firebase-messaging:23.2.1")
|
||||
"fcmImplementation"("org.jetbrains.kotlinx:kotlinx-coroutines-play-services:${Vers.kotlinxCoroutinesVersion}")
|
||||
|
||||
// implementation "org.conscrypt:conscrypt-android:$conscryptVersion"
|
||||
api("org.conscrypt:conscrypt-android:${Vers.conscryptVersion}")
|
||||
implementation("com.github.UnifiedPush:android-connector:2.1.1")
|
||||
implementation("jp.wasabeef:glide-transformations:4.3.0")
|
||||
|
||||
implementation("com.github.androidmads:QRGenerator:1.0.1")
|
||||
|
||||
val apng4AndroidVersion = "2.25.0"
|
||||
implementation("com.github.penfeizhou.android.animation:apng:$apng4AndroidVersion")
|
||||
|
||||
ksp("com.github.bumptech.glide:ksp:${Vers.glideVersion}")
|
||||
|
||||
detektPlugins("io.gitlab.arturbosch.detekt:detekt-formatting:${Vers.detektVersion}")
|
||||
|
||||
testImplementation(project(":base"))
|
||||
androidTestImplementation(project(":base"))
|
||||
|
||||
androidTestApi("androidx.test.espresso:espresso-core:${Vers.androidxTestEspressoCoreVersion}")
|
||||
androidTestApi("androidx.test.ext:junit-ktx:1.1.5")
|
||||
androidTestApi("androidx.test.ext:junit:${Vers.androidxTestExtJunitVersion}")
|
||||
androidTestApi("androidx.test.ext:truth:1.5.0")
|
||||
androidTestApi("androidx.test:core-ktx:${Vers.testKtxVersion}")
|
||||
androidTestApi("androidx.test:core:${Vers.androidxTestVersion}")
|
||||
androidTestApi("androidx.test:runner:1.5.2")
|
||||
androidTestApi("org.jetbrains.kotlin:kotlin-test:${Vers.kotlinTestVersion}")
|
||||
androidTestApi("org.jetbrains.kotlinx:kotlinx-coroutines-test:${Vers.kotlinxCoroutinesVersion}")
|
||||
testApi("androidx.arch.core:core-testing:${Vers.archVersion}")
|
||||
testApi("junit:junit:${Vers.junitVersion}")
|
||||
testApi("org.jetbrains.kotlin:kotlin-test:${Vers.kotlinTestVersion}")
|
||||
testApi("org.jetbrains.kotlinx:kotlinx-coroutines-test:${Vers.kotlinxCoroutinesVersion}")
|
||||
|
||||
// To use android test orchestrator
|
||||
androidTestUtil("androidx.test:orchestrator:1.4.2")
|
||||
|
||||
testApi("com.squareup.okhttp3:mockwebserver:${Vers.okhttpVersion}") {
|
||||
exclude("com.squareup.okio", "okio")
|
||||
exclude("com.squareup.okhttp3", "okhttp")
|
||||
exclude("org.jetbrains.kotlin", "kotlin-stdlib-common")
|
||||
exclude("org.jetbrains.kotlin", "kotlin-stdlib")
|
||||
exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
|
||||
}
|
||||
androidTestApi("com.squareup.okhttp3:mockwebserver:${Vers.okhttpVersion}") {
|
||||
exclude("com.squareup.okio", "okio")
|
||||
exclude("com.squareup.okhttp3", "okhttp")
|
||||
exclude("org.jetbrains.kotlin", "kotlin-stdlib-common")
|
||||
exclude("org.jetbrains.kotlin", "kotlin-stdlib")
|
||||
exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
fun willApplyGoogleService(): Boolean {
|
||||
val gradle = getGradle()
|
||||
val taskRequestsString = gradle.getStartParameter().getTaskRequests().toString()
|
||||
|
||||
val isMatch = """(assemble|generate|connected)Fcm""".toRegex()
|
||||
.find(taskRequestsString) != null
|
||||
|
||||
println("willApplyGoogleService=$isMatch. $taskRequestsString")
|
||||
return isMatch
|
||||
}
|
||||
|
||||
if (willApplyGoogleService()) apply(plugin = "com.google.gms.google-services")
|
||||
|
||||
|
||||
tasks.register<Detekt>("detektAll") {
|
||||
description = "Custom DETEKT build for all modules"
|
||||
|
||||
// activate all available (even unstable) rules.
|
||||
allRules = false
|
||||
|
||||
// a way of suppressing issues before introducing detekt
|
||||
// baseline = file("$rootDir/config/detekt/baseline.xml")
|
||||
|
||||
parallel = true
|
||||
ignoreFailures = false
|
||||
autoCorrect = false
|
||||
|
||||
// preconfigure defaults
|
||||
buildUponDefaultConfig = true
|
||||
|
||||
val configFile = files("$rootDir/config/detekt/config.yml")
|
||||
config.setFrom(configFile)
|
||||
|
||||
val baselineFile = file("$rootDir/config/detekt/baseline.xml")
|
||||
if (baselineFile.isFile()) {
|
||||
baseline.set(baselineFile)
|
||||
}
|
||||
|
||||
setSource(
|
||||
files(
|
||||
"$rootDir/anko/src",
|
||||
"$rootDir/apng/src",
|
||||
"$rootDir/apng_android/src",
|
||||
"$rootDir/app/src",
|
||||
"$rootDir/base/src",
|
||||
"$rootDir/colorpicker/src",
|
||||
"$rootDir/emoji/src",
|
||||
"$rootDir/icon_material_symbols/src",
|
||||
"$rootDir/sample_apng/src",
|
||||
)
|
||||
)
|
||||
|
||||
// val kotlinFiles = "**/*.kt"
|
||||
// include(kotlinFiles)
|
||||
|
||||
val resourceFiles = "**/resources/**"
|
||||
val buildFiles = "**/build/**"
|
||||
exclude(resourceFiles, buildFiles)
|
||||
reports {
|
||||
html.enabled = true
|
||||
xml.enabled = false
|
||||
txt.enabled = false
|
||||
|
||||
xml.required.set(true)
|
||||
xml.outputLocation.set(file("$buildDir/reports/detekt/st-${name}.xml"))
|
||||
html.required.set(true)
|
||||
html.outputLocation.set(file("$buildDir/reports/detekt/st-${name}.html"))
|
||||
txt.required.set(true)
|
||||
txt.outputLocation.set(file("$buildDir/reports/detekt/st-${name}.txt"))
|
||||
sarif.required.set(true)
|
||||
sarif.outputLocation.set(file("$buildDir/reports/detekt/st-${name}.sarif"))
|
||||
}
|
||||
}
|
||||
|
|
@ -1,175 +0,0 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id "com.android.library"
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
android {
|
||||
namespace "jp.juggler.base"
|
||||
|
||||
compileSdk(stCompileSdkVersion)
|
||||
setBuildToolsVersion(stBuildToolsVersion)
|
||||
|
||||
defaultConfig {
|
||||
minSdk stMinSdkVersion
|
||||
targetSdk stTargetSdkVersion
|
||||
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility javaSourceCompatibility
|
||||
targetCompatibility javaTargetCompatibility
|
||||
coreLibraryDesugaringEnabled true
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(kotlinJvmToolchain)
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
tasks.withType(KotlinCompile).configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
packagingOptions {
|
||||
jniLibs {
|
||||
excludes += ["META-INF/LICENSE*"]
|
||||
}
|
||||
resources {
|
||||
excludes += ["META-INF/LICENSE*"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(kotlinJvmToolchain)
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// desugar_jdk_libs 2.0.0 は AGP 7.4.0-alpha10 以降を要求する
|
||||
//noinspection GradleDependency
|
||||
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$desugarLibVersion"
|
||||
|
||||
api "androidx.appcompat:appcompat:$appcompatVersion"
|
||||
api "androidx.browser:browser:1.5.0"
|
||||
api "androidx.core:core-ktx:$coreKtxVersion"
|
||||
api "androidx.drawerlayout:drawerlayout:1.2.0"
|
||||
api "androidx.emoji2:emoji2-bundled:$emoji2Version"
|
||||
api "androidx.emoji2:emoji2-views-helper:$emoji2Version"
|
||||
api "androidx.emoji2:emoji2-views:$emoji2Version"
|
||||
api "androidx.emoji2:emoji2:$emoji2Version"
|
||||
api "androidx.exifinterface:exifinterface:1.3.6"
|
||||
api "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion"
|
||||
api "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion"
|
||||
api "androidx.lifecycle:lifecycle-process:$lifecycleVersion"
|
||||
api "androidx.lifecycle:lifecycle-reactivestreams-ktx:$lifecycleVersion"
|
||||
api "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycleVersion"
|
||||
api "androidx.lifecycle:lifecycle-service:$lifecycleVersion"
|
||||
api "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
|
||||
api "androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycleVersion"
|
||||
api "androidx.recyclerview:recyclerview:1.3.0"
|
||||
api "androidx.startup:startup-runtime:$startupVersion"
|
||||
api "androidx.work:work-runtime-ktx:$workVersion"
|
||||
api "androidx.work:work-runtime:$workVersion"
|
||||
api "com.astuetz:pagerslidingtabstrip:1.0.1"
|
||||
api "com.caverock:androidsvg-aar:1.4"
|
||||
api "com.github.hadilq:live-event:1.3.0"
|
||||
api "com.github.omadahealth:swipy:1.2.3@aar"
|
||||
api "com.github.woxthebox:draglistview:1.7.3"
|
||||
api "com.google.android.flexbox:flexbox:3.0.0"
|
||||
api "com.google.android.material:material:$materialVersion"
|
||||
api "com.otaliastudios:transcoder:0.10.5"
|
||||
api "com.squareup.okhttp3:okhttp-urlconnection:$okhttpVersion"
|
||||
api "com.squareup.okhttp3:okhttp:$okhttpVersion"
|
||||
// api "io.github.inflationx:calligraphy3:3.1.1"
|
||||
// api "io.github.inflationx:viewpump:2.1.1"
|
||||
api "org.bouncycastle:bcprov-jdk15on:1.70"
|
||||
api "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
|
||||
api "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlinxCoroutinesVersion"
|
||||
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion"
|
||||
api "org.jetbrains.kotlinx:kotlinx-datetime:0.4.0"
|
||||
api "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1"
|
||||
api "ru.gildor.coroutines:kotlin-coroutines-okhttp:1.0"
|
||||
|
||||
//non-OSS dependency api "androidx.media3:media3-cast:$media3Version"
|
||||
api "androidx.media3:media3-common:$media3Version"
|
||||
api "androidx.media3:media3-datasource:$media3Version"
|
||||
api "androidx.media3:media3-effect:$media3Version"
|
||||
api "androidx.media3:media3-exoplayer:$media3Version"
|
||||
api "androidx.media3:media3-session:$media3Version"
|
||||
api "androidx.media3:media3-transformer:$media3Version"
|
||||
api "androidx.media3:media3-ui:$media3Version"
|
||||
|
||||
// commons-codecをapiにすると、端末上の古いjarが使われてしまう
|
||||
// declaration of "org.apache.commons.codec.binary.Base64" appears in /system/framework/org.apache.http.legacy.jar)
|
||||
androidTestImplementation "commons-codec:commons-codec:$commonsCodecVersion"
|
||||
|
||||
// Koin main features for Android
|
||||
api "io.insert-koin:koin-android:$koinVersion"
|
||||
api "io.insert-koin:koin-android-compat:$koinVersion"
|
||||
api "io.insert-koin:koin-androidx-workmanager:$koinVersion"
|
||||
// api "io.insert-koin:koin-androidx-navigation:$koinVersion"
|
||||
// api "io.insert-koin:koin-androidx-compose:$koinVersion"
|
||||
|
||||
// for com.bumptech.glide.integration.webp.*
|
||||
api "com.github.zjupure:webpdecoder:$webpDecoderVersion"
|
||||
api "com.github.bumptech.glide:glide:$glideVersion"
|
||||
api "com.github.bumptech.glide:annotations:$glideVersion"
|
||||
api("com.github.bumptech.glide:okhttp3-integration:$glideVersion") {
|
||||
exclude group: "com.squareup.okhttp3", module: "okhttp"
|
||||
}
|
||||
|
||||
androidTestApi "androidx.test.espresso:espresso-core:$androidxTestEspressoCoreVersion"
|
||||
androidTestApi "androidx.test.ext:junit-ktx:1.1.5"
|
||||
androidTestApi "androidx.test.ext:junit:$androidxTestExtJunitVersion"
|
||||
androidTestApi "androidx.test.ext:truth:1.5.0"
|
||||
androidTestApi "androidx.test:core-ktx:$testKtxVersion"
|
||||
androidTestApi "androidx.test:core:$androidxTestVersion"
|
||||
androidTestApi "androidx.test:runner:1.5.2"
|
||||
androidTestApi "org.jetbrains.kotlin:kotlin-test:$kotlinTestVersion"
|
||||
androidTestApi "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinxCoroutinesVersion"
|
||||
testApi "androidx.arch.core:core-testing:$archVersion"
|
||||
testApi "junit:junit:$junitVersion"
|
||||
testApi "org.jetbrains.kotlin:kotlin-test:$kotlinTestVersion"
|
||||
testApi "org.jetbrains.kotlinx:kotlinx-coroutines-test:$kotlinxCoroutinesVersion"
|
||||
|
||||
// To use android test orchestrator
|
||||
androidTestUtil "androidx.test:orchestrator:1.4.2"
|
||||
|
||||
testApi("com.squareup.okhttp3:mockwebserver:$okhttpVersion") {
|
||||
exclude group: "com.squareup.okio", module: "okio"
|
||||
exclude group: "com.squareup.okhttp3", module: "okhttp"
|
||||
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib-common"
|
||||
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib"
|
||||
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib-jdk8"
|
||||
}
|
||||
androidTestApi("com.squareup.okhttp3:mockwebserver:$okhttpVersion") {
|
||||
exclude group: "com.squareup.okio", module: "okio"
|
||||
exclude group: "com.squareup.okhttp3", module: "okhttp"
|
||||
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib-common"
|
||||
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib"
|
||||
exclude group: "org.jetbrains.kotlin", module: "kotlin-stdlib-jdk8"
|
||||
}
|
||||
|
||||
// conscrypt をUnitテストするための指定
|
||||
// https://github.com/google/conscrypt/issues/649
|
||||
|
||||
api "org.conscrypt:conscrypt-android:$conscryptVersion"
|
||||
}
|
|
@ -0,0 +1,178 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
android {
|
||||
namespace = "jp.juggler.base"
|
||||
|
||||
compileSdk = Vers.stCompileSdkVersion
|
||||
buildToolsVersion = Vers.stBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdk = Vers.stMinSdkVersion
|
||||
targetSdk = Vers.stTargetSdkVersion
|
||||
|
||||
consumerProguardFiles( "consumer-rules.pro")
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = Vers.javaSourceCompatibility
|
||||
targetCompatibility = Vers.javaTargetCompatibility
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(Vers.kotlinJvmToolchain)
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
}
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
packagingOptions {
|
||||
jniLibs {
|
||||
excludes .addAll(listOf("META-INF/LICENSE*"))
|
||||
}
|
||||
resources {
|
||||
excludes .addAll(listOf("META-INF/LICENSE*"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain( Vers.kotlinJvmToolchain)
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// desugar_jdk_libs 2.0.0 は AGP 7.4.0-alpha10 以降を要求する
|
||||
//noinspection GradleDependency
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:${Vers.desugarLibVersion}")
|
||||
|
||||
api("androidx.appcompat:appcompat:${Vers.appcompatVersion}")
|
||||
api("androidx.browser:browser:1.5.0")
|
||||
api("androidx.core:core-ktx:${Vers.coreKtxVersion}")
|
||||
api("androidx.drawerlayout:drawerlayout:1.2.0")
|
||||
api("androidx.emoji2:emoji2-bundled:${Vers.emoji2Version}")
|
||||
api("androidx.emoji2:emoji2-views-helper:${Vers.emoji2Version}")
|
||||
api("androidx.emoji2:emoji2-views:${Vers.emoji2Version}")
|
||||
api("androidx.emoji2:emoji2:${Vers.emoji2Version}")
|
||||
api("androidx.exifinterface:exifinterface:1.3.6")
|
||||
api("androidx.lifecycle:lifecycle-common-java8:${Vers.lifecycleVersion}")
|
||||
api("androidx.lifecycle:lifecycle-livedata-ktx:${Vers.lifecycleVersion}")
|
||||
api("androidx.lifecycle:lifecycle-process:${Vers.lifecycleVersion}")
|
||||
api("androidx.lifecycle:lifecycle-reactivestreams-ktx:${Vers.lifecycleVersion}")
|
||||
api("androidx.lifecycle:lifecycle-runtime-ktx:${Vers.lifecycleVersion}")
|
||||
api("androidx.lifecycle:lifecycle-service:${Vers.lifecycleVersion}")
|
||||
api("androidx.lifecycle:lifecycle-viewmodel-ktx:${Vers.lifecycleVersion}")
|
||||
api("androidx.lifecycle:lifecycle-viewmodel-savedstate:${Vers.lifecycleVersion}")
|
||||
api("androidx.recyclerview:recyclerview:1.3.0")
|
||||
api("androidx.startup:startup-runtime:${Vers.startupVersion}")
|
||||
api("androidx.work:work-runtime-ktx:${Vers.workVersion}")
|
||||
api("androidx.work:work-runtime:${Vers.workVersion}")
|
||||
api("com.astuetz:pagerslidingtabstrip:1.0.1")
|
||||
api("com.caverock:androidsvg-aar:1.4")
|
||||
api("com.github.hadilq:live-event:1.3.0")
|
||||
api("com.github.omadahealth:swipy:1.2.3@aar")
|
||||
api("com.github.woxthebox:draglistview:1.7.3")
|
||||
api("com.google.android.flexbox:flexbox:3.0.0")
|
||||
api("com.google.android.material:material:${Vers.materialVersion}")
|
||||
api("com.otaliastudios:transcoder:0.10.5")
|
||||
api("com.squareup.okhttp3:okhttp-urlconnection:${Vers.okhttpVersion}")
|
||||
api("com.squareup.okhttp3:okhttp:${Vers.okhttpVersion}")
|
||||
// api( "io.github.inflationx:calligraphy3:3.1.1")
|
||||
// api( "io.github.inflationx:viewpump:2.1.1")
|
||||
api("org.bouncycastle:bcprov-jdk15on:1.70")
|
||||
api("org.jetbrains.kotlin:kotlin-reflect:${Vers.kotlinVersion}")
|
||||
api("org.jetbrains.kotlinx:kotlinx-coroutines-android:${Vers.kotlinxCoroutinesVersion}")
|
||||
api("org.jetbrains.kotlinx:kotlinx-coroutines-core:${Vers.kotlinxCoroutinesVersion}")
|
||||
api("org.jetbrains.kotlinx:kotlinx-datetime:0.4.0")
|
||||
api("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
|
||||
api("ru.gildor.coroutines:kotlin-coroutines-okhttp:1.0")
|
||||
|
||||
//non-OSS dependency api "androidx.media3:media3-cast:$media3Version"
|
||||
api("androidx.media3:media3-common:${Vers.media3Version}")
|
||||
api("androidx.media3:media3-datasource:${Vers.media3Version}")
|
||||
api("androidx.media3:media3-effect:${Vers.media3Version}")
|
||||
api("androidx.media3:media3-exoplayer:${Vers.media3Version}")
|
||||
api("androidx.media3:media3-session:${Vers.media3Version}")
|
||||
api("androidx.media3:media3-transformer:${Vers.media3Version}")
|
||||
api("androidx.media3:media3-ui:${Vers.media3Version}")
|
||||
|
||||
// commons-codecをapiにすると、端末上の古いjarが使われてしまう
|
||||
// declaration of "org.apache.commons.codec.binary.Base64" appears in /system/framework/org.apache.http.legacy.jar)
|
||||
androidTestImplementation("commons-codec:commons-codec:${Vers.commonsCodecVersion}")
|
||||
|
||||
// Koin main features for Android
|
||||
api("io.insert-koin:koin-android:${Vers.koinVersion}")
|
||||
api("io.insert-koin:koin-android-compat:${Vers.koinVersion}")
|
||||
api("io.insert-koin:koin-androidx-workmanager:${Vers.koinVersion}")
|
||||
// api( "io.insert-koin:koin-androidx-navigation:$koinVersion")
|
||||
// api( "io.insert-koin:koin-androidx-compose:$koinVersion")
|
||||
|
||||
// for com.bumptech.glide.integration.webp.*
|
||||
api("com.github.zjupure:webpdecoder:${Vers.webpDecoderVersion}")
|
||||
api("com.github.bumptech.glide:glide:${Vers.glideVersion}")
|
||||
api("com.github.bumptech.glide:annotations:${Vers.glideVersion}")
|
||||
api("com.github.bumptech.glide:okhttp3-integration:${Vers.glideVersion}") {
|
||||
exclude("com.squareup.okhttp3", "okhttp")
|
||||
}
|
||||
|
||||
androidTestApi("androidx.test.espresso:espresso-core:${Vers.androidxTestEspressoCoreVersion}")
|
||||
androidTestApi("androidx.test.ext:junit-ktx:1.1.5")
|
||||
androidTestApi("androidx.test.ext:junit:${Vers.androidxTestExtJunitVersion}")
|
||||
androidTestApi("androidx.test.ext:truth:1.5.0")
|
||||
androidTestApi("androidx.test:core-ktx:${Vers.testKtxVersion}")
|
||||
androidTestApi("androidx.test:core:${Vers.androidxTestVersion}")
|
||||
androidTestApi("androidx.test:runner:1.5.2")
|
||||
androidTestApi("org.jetbrains.kotlin:kotlin-test:${Vers.kotlinTestVersion}")
|
||||
androidTestApi("org.jetbrains.kotlinx:kotlinx-coroutines-test:${Vers.kotlinxCoroutinesVersion}")
|
||||
testApi("androidx.arch.core:core-testing:${Vers.archVersion}")
|
||||
testApi("junit:junit:${Vers.junitVersion}")
|
||||
testApi("org.jetbrains.kotlin:kotlin-test:${Vers.kotlinTestVersion}")
|
||||
testApi("org.jetbrains.kotlinx:kotlinx-coroutines-test:${Vers.kotlinxCoroutinesVersion}")
|
||||
|
||||
// To use android test orchestrator
|
||||
androidTestUtil("androidx.test:orchestrator:1.4.2")
|
||||
|
||||
testApi("com.squareup.okhttp3:mockwebserver:${Vers.okhttpVersion}") {
|
||||
exclude("com.squareup.okio", "okio")
|
||||
exclude("com.squareup.okhttp3", "okhttp")
|
||||
exclude("org.jetbrains.kotlin", "kotlin-stdlib-common")
|
||||
exclude("org.jetbrains.kotlin", "kotlin-stdlib")
|
||||
exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
|
||||
}
|
||||
androidTestApi("com.squareup.okhttp3:mockwebserver:${Vers.okhttpVersion}") {
|
||||
exclude("com.squareup.okio", "okio")
|
||||
exclude("com.squareup.okhttp3", "okhttp")
|
||||
exclude("org.jetbrains.kotlin", "kotlin-stdlib-common")
|
||||
exclude("org.jetbrains.kotlin", "kotlin-stdlib")
|
||||
exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
|
||||
}
|
||||
|
||||
// conscrypt をUnitテストするための指定
|
||||
// https://github.com/google/conscrypt/issues/649
|
||||
|
||||
api("org.conscrypt:conscrypt-android:${Vers.conscryptVersion}")
|
||||
}
|
89
build.gradle
89
build.gradle
|
@ -1,89 +0,0 @@
|
|||
buildscript {
|
||||
|
||||
ext.androidxAnnotationVersion = "1.6.0"
|
||||
ext.androidxTestEspressoCoreVersion = "3.5.1"
|
||||
ext.androidxTestExtJunitVersion = "1.1.5"
|
||||
ext.androidxTestVersion = "1.5.0"
|
||||
ext.ankoVersion = "0.10.8"
|
||||
ext.appcompatVersion = "1.6.1"
|
||||
ext.archVersion = "2.2.0"
|
||||
|
||||
ext.commonsCodecVersion = "1.16.0"
|
||||
ext.composeVersion = "1.0.5"
|
||||
ext.conscryptVersion = "2.5.2"
|
||||
ext.conscryptVersion = "2.5.2"
|
||||
ext.coreKtxVersion = "1.10.1"
|
||||
ext.desugarLibVersion = '2.0.3'
|
||||
ext.detektVersion = '1.23.0'
|
||||
ext.emoji2Version = "1.3.0"
|
||||
ext.media3Version = "1.1.0"
|
||||
|
||||
ext.glideVersion = '4.15.1'
|
||||
ext.webpDecoderVersion = "2.3.$glideVersion"
|
||||
|
||||
ext.javaSourceCompatibility = JavaVersion.VERSION_1_8
|
||||
ext.javaTargetCompatibility = JavaVersion.VERSION_1_8
|
||||
ext.junitVersion = "4.13.2"
|
||||
ext.koinVersion = '3.4.2'
|
||||
ext.kotlinJvmTarget = "1.8"
|
||||
ext.kotlinJvmToolchain = 17
|
||||
ext.kotlinVersion = '1.9.0'
|
||||
ext.kotlinTestVersion = '1.9.0'
|
||||
ext.kotlinxCoroutinesVersion = '1.7.2'
|
||||
ext.kspVersion = "1.9.0-1.0.11"
|
||||
ext.lifecycleVersion = "2.6.1"
|
||||
ext.materialVersion = "1.9.0"
|
||||
ext.okhttpVersion = '5.0.0-alpha.11'
|
||||
ext.preferenceKtxVersion = "1.2.0"
|
||||
ext.stBuildToolsVersion = "34.0.0"
|
||||
ext.stCompileSdkVersion = 34
|
||||
ext.stMinSdkVersion = 26
|
||||
ext.stTargetSdkVersion = 34
|
||||
ext.startupVersion = "1.1.1"
|
||||
ext.testKtxVersion = "1.5.0"
|
||||
ext.workVersion = "2.8.1"
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:8.1.0'
|
||||
|
||||
// room のバージョンの影響で google-services を上げられない場合がある
|
||||
classpath "com.google.gms:google-services:4.3.15"
|
||||
|
||||
//noinspection DifferentKotlinGradleVersion
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
|
||||
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion"
|
||||
|
||||
classpath "com.github.bjoernq:unmockplugin:0.7.6"
|
||||
|
||||
classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion"
|
||||
}
|
||||
}
|
||||
|
||||
plugins{
|
||||
id("org.jetbrains.kotlin.android") version("$kotlinVersion") apply false
|
||||
id("com.google.devtools.ksp") version("$kspVersion") apply false
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
|
||||
// com.github.androidmads:QRGenerator
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
tasks.withType(JavaCompile) {
|
||||
options.compilerArgs << "-Xlint:unchecked"
|
||||
options.compilerArgs << "-Xlint:deprecation"
|
||||
options.compilerArgs << "-Xlint:divzero"
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
buildscript {
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:${Vers.androidGradlePruginVersion}")
|
||||
|
||||
// room のバージョンの影響で google-services を上げられない場合がある
|
||||
classpath("com.google.gms:google-services:4.3.15")
|
||||
|
||||
//noinspection DifferentKotlinGradleVersion
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Vers.kotlinVersion}")
|
||||
classpath("org.jetbrains.kotlin:kotlin-serialization:${Vers.kotlinVersion}")
|
||||
|
||||
classpath("com.github.bjoernq:unmockplugin:0.7.6")
|
||||
|
||||
classpath("io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${Vers.detektVersion}")
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id("org.jetbrains.kotlin.jvm") version "${Vers.kotlinVersion}"
|
||||
id("org.jetbrains.kotlin.android") version ("${Vers.kotlinVersion}") apply false
|
||||
id("com.google.devtools.ksp") version ("${Vers.kspVersion}") apply false
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
|
||||
// com.github.androidmads:QRGenerator
|
||||
maven(url = "https://jitpack.io")
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
options.compilerArgs.addAll(
|
||||
arrayOf(
|
||||
"-Xlint:unchecked",
|
||||
"-Xlint:deprecation",
|
||||
"-Xlint:divzero",
|
||||
)
|
||||
)
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
import org.gradle.api.JavaVersion
|
||||
|
||||
object Vers {
|
||||
val javaSourceCompatibility = JavaVersion.VERSION_1_8
|
||||
val javaTargetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
const val androidGradlePruginVersion = "8.1.1"
|
||||
const val androidxAnnotationVersion = "1.6.0"
|
||||
const val androidxTestEspressoCoreVersion = "3.5.1"
|
||||
const val androidxTestExtJunitVersion = "1.1.5"
|
||||
const val androidxTestVersion = "1.5.0"
|
||||
const val ankoVersion = "0.10.8"
|
||||
const val appcompatVersion = "1.6.1"
|
||||
const val archVersion = "2.2.0"
|
||||
const val commonsCodecVersion = "1.16.0"
|
||||
const val composeVersion = "1.0.5"
|
||||
const val conscryptVersion = "2.5.2"
|
||||
const val coreKtxVersion = "1.10.1"
|
||||
const val desugarLibVersion = "2.0.3"
|
||||
const val detektVersion = "1.23.1"
|
||||
const val emoji2Version = "1.3.0"
|
||||
const val glideVersion = "4.15.1"
|
||||
const val junitVersion = "4.13.2"
|
||||
const val koinVersion = "3.4.2"
|
||||
const val kotlinJvmTarget = "1.8"
|
||||
const val kotlinJvmToolchain = 17
|
||||
const val kotlinTestVersion = "1.9.0"
|
||||
const val kotlinVersion = "1.9.0"
|
||||
const val kotlinxCoroutinesVersion = "1.7.2"
|
||||
const val kspVersion = "1.9.0-1.0.11"
|
||||
const val lifecycleVersion = "2.6.1"
|
||||
const val materialVersion = "1.9.0"
|
||||
const val media3Version = "1.1.0"
|
||||
const val okhttpVersion = "5.0.0-alpha.11"
|
||||
const val preferenceKtxVersion = "1.2.0"
|
||||
const val stBuildToolsVersion = "34.0.0"
|
||||
const val stCompileSdkVersion = 34
|
||||
const val stMinSdkVersion = 26
|
||||
const val stTargetSdkVersion = 34
|
||||
const val startupVersion = "1.1.1"
|
||||
const val testKtxVersion = "1.5.0"
|
||||
const val webpDecoderVersion = "2.3.$glideVersion"
|
||||
const val workVersion = "2.8.1"
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace 'com.jrummyapps.android.colorpicker'
|
||||
|
||||
resourcePrefix "cpv_"
|
||||
|
||||
compileSdk(stCompileSdkVersion)
|
||||
setBuildToolsVersion(stBuildToolsVersion)
|
||||
|
||||
defaultConfig {
|
||||
minSdk(stMinSdkVersion)
|
||||
targetSdk(stTargetSdkVersion)
|
||||
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
|
||||
lint {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility javaSourceCompatibility
|
||||
targetCompatibility javaTargetCompatibility
|
||||
coreLibraryDesugaringEnabled true
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(kotlinJvmToolchain)
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
freeCompilerArgs += [
|
||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
//"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
|
||||
//"-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
|
||||
//"-opt-in=androidx.compose.animation.ExperimentalAnimationApi",
|
||||
]
|
||||
}
|
||||
tasks.withType(KotlinCompile).configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$desugarLibVersion"
|
||||
implementation project(":base")
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.jrummyapps.android.colorpicker"
|
||||
|
||||
resourcePrefix = "cpv_"
|
||||
|
||||
compileSdk = Vers.stCompileSdkVersion
|
||||
buildToolsVersion = Vers.stBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdk = Vers.stMinSdkVersion
|
||||
targetSdk = Vers.stTargetSdkVersion
|
||||
|
||||
testInstrumentationRunner = "android.support.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
|
||||
lint {
|
||||
abortOnError = false
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = Vers.javaSourceCompatibility
|
||||
targetCompatibility = Vers.javaTargetCompatibility
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(Vers.kotlinJvmToolchain)
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
freeCompilerArgs = listOf(
|
||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
//"-opt-in=kotlinx.serialization.ExperimentalSerializationApi",
|
||||
//"-opt-in=androidx.compose.foundation.ExperimentalFoundationApi",
|
||||
//"-opt-in=androidx.compose.animation.ExperimentalAnimationApi",
|
||||
)
|
||||
}
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:${Vers.desugarLibVersion}")
|
||||
implementation(project(":base"))
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
apply plugin: "com.android.library"
|
||||
apply plugin: "kotlin-android"
|
||||
|
||||
android {
|
||||
namespace 'jp.juggler.emoji'
|
||||
|
||||
compileSdk(stCompileSdkVersion)
|
||||
setBuildToolsVersion(stBuildToolsVersion)
|
||||
|
||||
defaultConfig {
|
||||
minSdk(stMinSdkVersion)
|
||||
targetSdk(stTargetSdkVersion)
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility javaSourceCompatibility
|
||||
targetCompatibility javaTargetCompatibility
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(kotlinJvmToolchain)
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
tasks.withType(KotlinCompile).configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "jp.juggler.emoji"
|
||||
|
||||
compileSdk = Vers.stCompileSdkVersion
|
||||
buildToolsVersion = Vers.stBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdk = Vers.stMinSdkVersion
|
||||
targetSdk = Vers.stTargetSdkVersion
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android.txt"),
|
||||
"proguard-rules.pro",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility =Vers. javaSourceCompatibility
|
||||
targetCompatibility =Vers.javaTargetCompatibility
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(Vers.kotlinJvmToolchain)
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget =Vers. kotlinJvmTarget
|
||||
}
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget =Vers. kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
plugins {
|
||||
id "com.android.library"
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace "jp.juggler.icon_material_symbols"
|
||||
|
||||
compileSdk(stCompileSdkVersion)
|
||||
setBuildToolsVersion(stBuildToolsVersion)
|
||||
|
||||
defaultConfig {
|
||||
minSdk stMinSdkVersion
|
||||
targetSdk stTargetSdkVersion
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles "consumer-rules.pro"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility javaSourceCompatibility
|
||||
targetCompatibility javaTargetCompatibility
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(kotlinJvmToolchain)
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("com.android.library")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "jp.juggler.icon_material_symbols"
|
||||
|
||||
compileSdk = Vers.stCompileSdkVersion
|
||||
buildToolsVersion = Vers.stBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
minSdk = Vers.stMinSdkVersion
|
||||
targetSdk = Vers.stTargetSdkVersion
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles("consumer-rules.pro")
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro",
|
||||
)
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = Vers.javaSourceCompatibility
|
||||
targetCompatibility = Vers.javaTargetCompatibility
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvmToolchain(Vers.kotlinJvmToolchain)
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
}
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
apply plugin: "com.android.application"
|
||||
apply plugin: "kotlin-android"
|
||||
|
||||
android {
|
||||
namespace 'jp.juggler.apng.sample'
|
||||
|
||||
compileSdk(stCompileSdkVersion)
|
||||
setBuildToolsVersion(stBuildToolsVersion)
|
||||
|
||||
defaultConfig {
|
||||
targetSdk(stTargetSdkVersion)
|
||||
minSdk(stMinSdkVersion)
|
||||
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||
}
|
||||
}
|
||||
packagingOptions {
|
||||
resources {
|
||||
pickFirsts += ['META-INF/atomicfu.kotlin_module']
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility javaSourceCompatibility
|
||||
targetCompatibility javaTargetCompatibility
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
freeCompilerArgs += [
|
||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
// "-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi",
|
||||
// "-Xopt-in=androidx.compose.foundation.ExperimentalFoundationApi",
|
||||
// "-Xopt-in=androidx.compose.animation.ExperimentalAnimationApi",
|
||||
]
|
||||
}
|
||||
kotlin {
|
||||
jvmToolchain(kotlinJvmToolchain)
|
||||
}
|
||||
|
||||
tasks.withType(KotlinCompile).configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:$desugarLibVersion"
|
||||
implementation project(":base")
|
||||
implementation project(":apng_android")
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "jp.juggler.apng.sample"
|
||||
|
||||
compileSdk = Vers.stCompileSdkVersion
|
||||
buildToolsVersion = Vers.stBuildToolsVersion
|
||||
|
||||
defaultConfig {
|
||||
targetSdk = Vers.stTargetSdkVersion
|
||||
minSdk = Vers.stMinSdkVersion
|
||||
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android.txt"),
|
||||
"proguard-rules.pro",
|
||||
)
|
||||
}
|
||||
}
|
||||
packagingOptions {
|
||||
resources {
|
||||
pickFirsts += listOf("META-INF/atomicfu.kotlin_module")
|
||||
}
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = Vers.javaSourceCompatibility
|
||||
targetCompatibility = Vers.javaTargetCompatibility
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
freeCompilerArgs = listOf(
|
||||
"-opt-in=kotlin.ExperimentalStdlibApi",
|
||||
"-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
|
||||
// "-Xopt-in=kotlinx.serialization.ExperimentalSerializationApi",
|
||||
// "-Xopt-in=androidx.compose.foundation.ExperimentalFoundationApi",
|
||||
// "-Xopt-in=androidx.compose.animation.ExperimentalAnimationApi",
|
||||
)
|
||||
}
|
||||
kotlin {
|
||||
jvmToolchain(Vers.kotlinJvmToolchain)
|
||||
}
|
||||
|
||||
tasks.withType<KotlinCompile>().configureEach {
|
||||
kotlinOptions {
|
||||
jvmTarget = Vers.kotlinJvmTarget
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:${Vers.desugarLibVersion}")
|
||||
implementation(project(":base"))
|
||||
implementation(project(":apng_android"))
|
||||
}
|
Loading…
Reference in New Issue