-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from team-haribo/feature/3-architecture-settings
🔀 :: (#3) - architecture settings
- Loading branch information
Showing
86 changed files
with
1,064 additions
and
59 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,21 @@ | ||
plugins { | ||
id("com.android.application") | ||
id("org.jetbrains.kotlin.android") | ||
id("goms.android.application") | ||
id("goms.android.hilt") | ||
} | ||
|
||
android { | ||
namespace = "com.goms.goms_android_v2" | ||
compileSdk = 34 | ||
|
||
defaultConfig { | ||
applicationId = "com.goms.goms_android_v2" | ||
minSdk = 24 | ||
targetSdk = 34 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
vectorDrawables { | ||
useSupportLibrary = true | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
buildFeatures { | ||
compose = true | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion = "1.4.3" | ||
} | ||
packaging { | ||
resources { | ||
excludes += "/META-INF/{AL2.0,LGPL2.1}" | ||
excludes += "META-INF/DEPENDENCIES" | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
|
||
implementation("androidx.core:core-ktx:1.9.0") | ||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2") | ||
implementation("androidx.activity:activity-compose:1.8.2") | ||
implementation(platform("androidx.compose:compose-bom:2023.03.00")) | ||
implementation("androidx.compose.ui:ui") | ||
implementation("androidx.compose.ui:ui-graphics") | ||
implementation("androidx.compose.ui:ui-tooling-preview") | ||
implementation("androidx.compose.material3:material3") | ||
testImplementation("junit:junit:4.13.2") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.5") | ||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") | ||
androidTestImplementation(platform("androidx.compose:compose-bom:2023.03.00")) | ||
androidTestImplementation("androidx.compose.ui:ui-test-junit4") | ||
debugImplementation("androidx.compose.ui:ui-tooling") | ||
debugImplementation("androidx.compose.ui:ui-test-manifest") | ||
implementation(project(":core:design-system")) | ||
implementation(libs.junit) | ||
androidTestImplementation(libs.androidx.test.ext) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/goms/goms_android_v2/di/GomsApplication.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.goms.goms_android_v2.di | ||
|
||
import android.app.Application | ||
import dagger.hilt.android.HiltAndroidApp | ||
|
||
@HiltAndroidApp | ||
class GomsApplication : Application() {} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
tasks.withType<KotlinCompile>().configureEach { | ||
kotlinOptions { | ||
jvmTarget = JavaVersion.VERSION_17.toString() | ||
} | ||
} | ||
|
||
dependencies { | ||
compileOnly(libs.android.gradlePlugin) | ||
compileOnly(libs.kotlin.gradlePlugin) | ||
compileOnly(libs.ksp.gradlePlugin) | ||
} | ||
|
||
gradlePlugin { | ||
plugins { | ||
register("androidApplication") { | ||
id = "goms.android.application" | ||
implementationClass = "AndroidApplicationConventionPlugin" | ||
} | ||
|
||
register("androidHilt") { | ||
id = "goms.android.hilt" | ||
implementationClass = "AndroidHiltConventionPlugin" | ||
} | ||
|
||
register("androidLint") { | ||
id = "goms.android.lint" | ||
implementationClass = "AndroidLintConventionPlugin" | ||
} | ||
|
||
register("androidCore") { | ||
id = "goms.android.core" | ||
implementationClass = "AndroidCoreConventionPlugin" | ||
} | ||
|
||
register("androidCompose") { | ||
id = "goms.android.compose" | ||
implementationClass = "AndroidComposeConventionPlugin" | ||
} | ||
|
||
register("jvmLibrary") { | ||
id = "goms.jvm.library" | ||
implementationClass = "JvmLibraryConventionPlugin" | ||
} | ||
|
||
register("androidFeature") { | ||
id = "goms.android.feature" | ||
implementationClass = "AndroidFeatureConventionPlugin" | ||
} | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
build-logic/convention/src/main/kotlin/AndroidApplicationConventionPlugin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import com.android.build.api.dsl.ApplicationExtension | ||
import com.goms.goms_android_v2.configureKotlinAndroid | ||
import com.goms.goms_android_v2.libs | ||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.kotlin.dsl.configure | ||
import org.gradle.kotlin.dsl.dependencies | ||
|
||
class AndroidApplicationConventionPlugin : Plugin<Project> { | ||
override fun apply(target: Project) { | ||
with(target) { | ||
with(pluginManager) { | ||
apply("com.android.application") | ||
apply("org.jetbrains.kotlin.android") | ||
apply("goms.android.lint") | ||
} | ||
|
||
extensions.configure<ApplicationExtension> { | ||
configureKotlinAndroid(this) | ||
defaultConfig { | ||
applicationId = "com.goms.goms_android_v2" | ||
minSdk = 26 | ||
targetSdk = 34 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
|
||
vectorDrawables.useSupportLibrary = true | ||
} | ||
|
||
buildFeatures.compose = true | ||
|
||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = false | ||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") | ||
} | ||
} | ||
|
||
composeOptions { | ||
kotlinCompilerExtensionVersion = libs.findVersion("androidxComposeCompiler").get().toString() | ||
} | ||
|
||
dependencies { | ||
add("implementation", libs.findBundle("kotlinx-coroutines").get()) | ||
add("implementation", libs.findBundle("compose").get()) | ||
} | ||
} | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
build-logic/convention/src/main/kotlin/AndroidComposeConventionPlugin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import com.android.build.gradle.LibraryExtension | ||
import com.goms.goms_android_v2.configureAndroidCompose | ||
import com.goms.goms_android_v2.libs | ||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.kotlin.dsl.configure | ||
import org.gradle.kotlin.dsl.dependencies | ||
|
||
class AndroidComposeConventionPlugin :Plugin<Project> { | ||
override fun apply(target: Project) { | ||
with(target) { | ||
with(pluginManager) { | ||
apply("com.android.library") | ||
|
||
extensions.configure<LibraryExtension> { | ||
configureAndroidCompose(this) | ||
} | ||
|
||
dependencies { | ||
add("implementation", libs.findBundle("compose").get()) | ||
} | ||
} | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
build-logic/convention/src/main/kotlin/AndroidCoreConventionPlugin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import com.android.build.api.dsl.LibraryExtension | ||
import com.goms.goms_android_v2.configureKotlinAndroid | ||
import com.goms.goms_android_v2.libs | ||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.kotlin.dsl.configure | ||
import org.gradle.kotlin.dsl.dependencies | ||
|
||
class AndroidCoreConventionPlugin : Plugin<Project> { | ||
override fun apply(target: Project) { | ||
with(target) { | ||
with(pluginManager) { | ||
apply("com.android.library") | ||
apply("org.jetbrains.kotlin.android") | ||
apply("goms.android.lint") | ||
} | ||
|
||
extensions.configure<LibraryExtension> { | ||
configureKotlinAndroid(this) | ||
defaultConfig.minSdk = 26 | ||
} | ||
|
||
dependencies { | ||
add("implementation", libs.findLibrary("androidx-core-ktx").get()) | ||
add("implementation", libs.findLibrary("kotlinx-coroutines-android").get()) | ||
add("implementation", libs.findLibrary("junit").get()) | ||
add("androidTestImplementation", libs.findLibrary("androidx-test-ext").get()) | ||
} | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
build-logic/convention/src/main/kotlin/AndroidFeatureConventionPlugin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import com.goms.goms_android_v2.libs | ||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.kotlin.dsl.dependencies | ||
|
||
class AndroidFeatureConventionPlugin : Plugin<Project> { | ||
override fun apply(target: Project) { | ||
with(target) { | ||
with(pluginManager) { | ||
apply("goms.android.core") | ||
apply("goms.android.hilt") | ||
apply("goms.android.compose") | ||
} | ||
|
||
dependencies { | ||
add("implementation", project(":core:model")) | ||
add("implementation", project(":core:design-system")) | ||
add("implementation", project(":core:data:repository")) | ||
add("implementation", project(":core:domain")) | ||
|
||
add("implementation", libs.findLibrary("coil.kt").get()) | ||
|
||
add("implementation", libs.findLibrary("androidx.lifecycle.runtimeCompose").get()) | ||
add("implementation", libs.findLibrary("androidx.lifecycle.viewModelCompose").get()) | ||
} | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
build-logic/convention/src/main/kotlin/AndroidHiltConventionPlugin.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import com.goms.goms_android_v2.libs | ||
import org.gradle.api.Plugin | ||
import org.gradle.api.Project | ||
import org.gradle.kotlin.dsl.dependencies | ||
|
||
class AndroidHiltConventionPlugin : Plugin<Project> { | ||
override fun apply(target: Project) { | ||
with(target) { | ||
with(pluginManager) { | ||
apply("com.google.devtools.ksp") | ||
apply("dagger.hilt.android.plugin") | ||
} | ||
|
||
dependencies { | ||
add("implementation", (libs.findLibrary("hilt.android").get())) | ||
add("ksp", (libs.findLibrary("hilt.compiler").get())) | ||
add("kspAndroidTest", (libs.findLibrary("hilt.compiler").get())) | ||
add("kspTest", (libs.findLibrary("hilt.compiler").get())) | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.