Skip to content

Commit d819391

Browse files
authored
Merge pull request #78 from Nexters/dev
Release 1.0.3
2 parents 4b5bcf3 + ee7d2d1 commit d819391

File tree

87 files changed

+1256
-681
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1256
-681
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ obj/
114114
.idea/assetWizardSettings.xml
115115
.idea/.gitignore
116116
.idea/gradle.xml
117+
.idea/codeStyles/
117118

118119
deploymentTargetDropDown.xml
119120

app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/build
2+
/release
23
.kotlin/
34

45
# Created by https://www.gitignore.io/api/kotlin,androidstudio

app/build.gradle.kts

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,18 @@ import com.android.build.gradle.internal.cxx.configure.gradleLocalProperties
22
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
33

44
plugins {
5-
alias(libs.plugins.android.application)
6-
alias(libs.plugins.jetbrains.kotlin.android)
7-
alias(libs.plugins.hilt.android)
8-
alias(libs.plugins.kotlin.ksp)
5+
id("missionmate.android.application")
96
}
107

118
android {
129
namespace = "com.goalpanzi.mission_mate"
13-
compileSdk = 34
1410

1511
defaultConfig {
1612
applicationId = "com.goalpanzi.mission_mate"
17-
minSdk = 26
1813
targetSdk = 34
19-
versionCode = 5
20-
versionName = "1.0.2"
14+
versionCode = 6
15+
versionName = "1.0.3"
2116

22-
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
2317
vectorDrawables {
2418
useSupportLibrary = true
2519
}
@@ -46,23 +40,6 @@ android {
4640
isDebuggable = false
4741
}
4842
}
49-
buildFeatures {
50-
buildConfig = true
51-
}
52-
compileOptions {
53-
sourceCompatibility = JavaVersion.VERSION_17
54-
targetCompatibility = JavaVersion.VERSION_17
55-
}
56-
kotlin {
57-
compilerOptions {
58-
jvmTarget.set(JvmTarget.JVM_17)
59-
}
60-
}
61-
packaging {
62-
resources {
63-
excludes += "/META-INF/{AL2.0,LGPL2.1}"
64-
}
65-
}
6643
}
6744

6845
dependencies {

build-logic/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

build-logic/build.gradle.kts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
plugins {
2+
`kotlin-dsl`
3+
}
4+
5+
dependencies {
6+
implementation(libs.android.gradle.plugin)
7+
implementation(libs.kotlin.gradle.plugin)
8+
compileOnly(libs.ksp.gradle.plugin)
9+
compileOnly(libs.compose.compiler.gradle.plugin)
10+
}
11+
12+
gradlePlugin {
13+
plugins {
14+
register("androidApplication") {
15+
id = "missionmate.android.application"
16+
implementationClass = "MissionmateAndroidApplicationPlugin"
17+
}
18+
register("androidLibrary") {
19+
id = "missionmate.android.library"
20+
implementationClass = "MissionmateAndroidLibrary"
21+
}
22+
register("androidHilt") {
23+
id = "missionmate.android.hilt"
24+
implementationClass = "com.goalpanzi.mission_mate.convention.HiltAndroidPlugin"
25+
}
26+
}
27+
}

build-logic/settings.gradle.kts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
2+
@Suppress("UnstableApiUsage")
3+
dependencyResolutionManagement {
4+
repositories {
5+
google()
6+
mavenCentral()
7+
gradlePluginPortal()
8+
}
9+
versionCatalogs {
10+
create("libs") {
11+
from(files("../gradle/libs.versions.toml"))
12+
}
13+
}
14+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package com.goalpanzi.mission_mate.convention
2+
3+
import org.gradle.api.Project
4+
5+
fun Project.setNamespace(name: String) {
6+
androidExtension.apply {
7+
namespace = "com.goalpanzi.mission_mate.$name"
8+
}
9+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package com.goalpanzi.mission_mate.convention
2+
3+
import org.gradle.api.Project
4+
import org.gradle.kotlin.dsl.dependencies
5+
import org.gradle.kotlin.dsl.getByType
6+
import org.jetbrains.kotlin.compose.compiler.gradle.ComposeCompilerGradlePluginExtension
7+
8+
internal fun Project.configureComposeAndroid() {
9+
with(plugins) {
10+
apply("org.jetbrains.kotlin.plugin.compose")
11+
}
12+
13+
val libs = extensions.libs
14+
androidExtension.apply {
15+
buildFeatures {
16+
compose = true
17+
}
18+
19+
dependencies {
20+
val bom = libs.findLibrary("androidx-compose-bom").get()
21+
implementation(platform(bom))
22+
implementation(libs.findLibrary("androidx.ui").get())
23+
implementation(libs.findLibrary("androidx.ui.graphics").get())
24+
implementation(libs.findLibrary("androidx.ui.tooling.preview").get())
25+
implementation(libs.findLibrary("androidx.material3").get())
26+
implementation(libs.findLibrary("androidx.material").get())
27+
implementation(libs.findLibrary("androidx.navigation.compose").get())
28+
implementation(libs.findLibrary("androidx.hilt.navigation.compose").get())
29+
30+
debugImplementation(libs.findLibrary("androidx.ui.tooling").get())
31+
debugImplementation(libs.findLibrary("androidx.ui.test.manifest").get())
32+
33+
androidTestImplementation(platform(bom))
34+
androidTestImplementation(libs.findLibrary("androidx.ui.test.junit4").get())
35+
}
36+
}
37+
38+
extensions.getByType<ComposeCompilerGradlePluginExtension>().apply {
39+
enableStrongSkippingMode.set(true)
40+
}
41+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package com.goalpanzi.mission_mate.convention
2+
3+
import org.gradle.api.Project
4+
import org.gradle.kotlin.dsl.dependencies
5+
6+
internal fun Project.configureCoroutineAndroid() {
7+
val libs = extensions.libs
8+
configureCoroutineKotlin()
9+
dependencies {
10+
implementation(libs.findLibrary("coroutines.android").get())
11+
}
12+
}
13+
14+
internal fun Project.configureCoroutineKotlin() {
15+
val libs = extensions.libs
16+
dependencies {
17+
implementation(libs.findLibrary("coroutines.core").get())
18+
testImplementation(libs.findLibrary("coroutines.test").get())
19+
}
20+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package com.goalpanzi.mission_mate.convention
2+
3+
import com.android.build.api.dsl.ApplicationExtension
4+
import com.android.build.api.dsl.CommonExtension
5+
import com.android.build.api.dsl.LibraryExtension
6+
import org.gradle.api.Project
7+
import org.gradle.api.artifacts.VersionCatalog
8+
import org.gradle.api.artifacts.VersionCatalogsExtension
9+
import org.gradle.api.artifacts.dsl.DependencyHandler
10+
import org.gradle.api.plugins.ExtensionContainer
11+
import org.gradle.kotlin.dsl.getByType
12+
13+
internal val ExtensionContainer.libs: VersionCatalog
14+
get() = getByType<VersionCatalogsExtension>().named("libs")
15+
16+
internal val Project.androidExtension: CommonExtension<*, *, *, *, *, *>
17+
get() = runCatching { libraryExtension }
18+
.recoverCatching { applicationExtension }
19+
.onFailure { println("Could not find Library or Application extension from this project") }
20+
.getOrThrow()
21+
22+
internal val Project.applicationExtension: CommonExtension<*, *, *, *, *, *>
23+
get() = extensions.getByType<ApplicationExtension>()
24+
25+
internal val Project.libraryExtension: CommonExtension<*, *, *, *, *, *>
26+
get() = extensions.getByType<LibraryExtension>()
27+
28+
internal fun DependencyHandler.implementation(dependencyNotation: Any) {
29+
add("implementation", dependencyNotation)
30+
}
31+
32+
internal fun DependencyHandler.testImplementation(dependencyNotation: Any) {
33+
add("testImplementation", dependencyNotation)
34+
}
35+
36+
internal fun DependencyHandler.androidTestImplementation(dependencyNotation: Any) {
37+
add("androidTestImplementation", dependencyNotation)
38+
}
39+
40+
internal fun DependencyHandler.debugImplementation(dependencyNotation: Any) {
41+
add("debugImplementation", dependencyNotation)
42+
}
43+
44+
internal fun DependencyHandler.ksp(dependencyNotation: Any) {
45+
add("ksp", dependencyNotation)
46+
}

0 commit comments

Comments
 (0)