Skip to content

Commit 3342327

Browse files
authored
Merge pull request #308 from ptkNktq/update/env
Update/env
2 parents 521fe65 + 380dca8 commit 3342327

15 files changed

Lines changed: 37 additions & 56 deletions

File tree

AndroidApp/.idea/kotlinc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AndroidApp/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Androidアプリ
22

3+
### 開発環境
4+
5+
- Android Studio Otter 3 Feature Drop | 2025.2.3
6+
- Windows 11
7+
- 一部 wsl2(Ubuntu 22.04.5 LTS)
8+
39
### テスト
410

511
###### ユニットテスト

AndroidApp/app/build.gradle.kts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ android {
1616
}
1717
}
1818

19-
kotlin {
20-
compilerOptions {
21-
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
22-
}
23-
}
24-
2519
dependencies {
2620
implementation(project(":ui"))
2721
// diのために必要

AndroidApp/build-logic/src/main/kotlin/CommonApplication.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class CommonApplication : Plugin<Project> {
1111
with(target) {
1212
with(pluginManager) {
1313
apply("com.android.application")
14-
apply("org.jetbrains.kotlin.android")
1514
}
1615
extensions.configure<ApplicationExtension> {
1716
configureApplication(this)

AndroidApp/build-logic/src/main/kotlin/CommonLibrary.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class CommonLibrary : Plugin<Project> {
1111
with(target) {
1212
with(pluginManager) {
1313
apply("com.android.library")
14-
apply("org.jetbrains.kotlin.android")
1514
}
1615
extensions.configure<LibraryExtension> {
1716
configureLibrary(this)

AndroidApp/build-logic/src/main/kotlin/CommonLibraryCompose.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ class CommonLibraryCompose : Plugin<Project> {
1212
with(target) {
1313
with(pluginManager) {
1414
apply("com.android.library")
15-
apply("org.jetbrains.kotlin.android")
1615
apply("org.jetbrains.kotlin.plugin.compose")
1716
}
1817
extensions.configure<LibraryExtension> {
Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
package me.nya_n.notificationnotifier
22

33
import com.android.build.api.dsl.ApplicationExtension
4-
import org.gradle.api.JavaVersion
54
import org.gradle.api.Project
65

76
internal fun Project.configureApplication(
87
extension: ApplicationExtension
98
) {
9+
configureCommon(extension)
1010
extension.apply {
11-
compileSdk = libs.version("compileSdk").toInt()
1211
defaultConfig {
13-
minSdk = libs.version("minSdk").toInt()
1412
targetSdk = libs.version("targetSdk").toInt()
1513
versionCode = libs.version("versionCode").toInt()
1614
versionName = libs.version("versionName")
17-
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
1815
}
1916
buildTypes {
2017
release {
@@ -25,9 +22,5 @@ internal fun Project.configureApplication(
2522
)
2623
}
2724
}
28-
compileOptions {
29-
sourceCompatibility = JavaVersion.VERSION_17
30-
targetCompatibility = JavaVersion.VERSION_17
31-
}
3225
}
3326
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package me.nya_n.notificationnotifier
2+
3+
import com.android.build.api.dsl.CommonExtension
4+
import org.gradle.api.JavaVersion
5+
import org.gradle.api.Project
6+
7+
internal fun Project.configureCommon(
8+
extension: CommonExtension
9+
) {
10+
extension.apply {
11+
compileSdk = libs.version("compileSdk").toInt()
12+
defaultConfig.apply {
13+
minSdk = libs.version("minSdk").toInt()
14+
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
15+
}
16+
compileOptions.apply {
17+
sourceCompatibility = JavaVersion.VERSION_17
18+
targetCompatibility = JavaVersion.VERSION_17
19+
}
20+
}
21+
}

AndroidApp/build-logic/src/main/kotlin/me/nya_n/notificationnotifier/Compose.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import com.android.build.api.dsl.CommonExtension
44
import org.gradle.api.Project
55

66
internal fun Project.configureCompose(
7-
extension: CommonExtension<*, *, *, *, *, *>
7+
extension: CommonExtension
88
) {
99
extension.apply {
10-
buildFeatures {
10+
buildFeatures.apply {
1111
compose = true
1212
}
1313
}
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
package me.nya_n.notificationnotifier
22

33
import com.android.build.api.dsl.LibraryExtension
4-
import org.gradle.api.JavaVersion
54
import org.gradle.api.Project
65

76
internal fun Project.configureLibrary(
87
extension: LibraryExtension
98
) {
9+
configureCommon(extension)
1010
extension.apply {
11-
compileSdk = libs.version("compileSdk").toInt()
12-
defaultConfig {
13-
minSdk = libs.version("minSdk").toInt()
14-
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
15-
}
1611
buildTypes {
1712
release {
1813
isMinifyEnabled = false
@@ -22,9 +17,5 @@ internal fun Project.configureLibrary(
2217
)
2318
}
2419
}
25-
compileOptions {
26-
sourceCompatibility = JavaVersion.VERSION_17
27-
targetCompatibility = JavaVersion.VERSION_17
28-
}
2920
}
3021
}

0 commit comments

Comments
 (0)