Skip to content

Commit

Permalink
Merge pull request #3 from Team-Ampersand/feature/2_add_dependency_fo…
Browse files Browse the repository at this point in the history
…r_dus

🔀 :: (#2) add dependency for dus
  • Loading branch information
Cjsghkd authored Sep 4, 2023
2 parents 02cab13 + 974e82b commit cfd5aea
Show file tree
Hide file tree
Showing 12 changed files with 96 additions and 42 deletions.
10 changes: 5 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
plugins {
id(Dependency.GradlePlugin.ANDROID_APPLICATION)
id(Dependency.GradlePlugin.KOTLIN_ANDROID)
id(ProjectProperties.GradlePlugin.ANDROID_APPLICATION)
id(ProjectProperties.GradlePlugin.KOTLIN_ANDROID)
}

android {
namespace = "com.msg.dotori"
compileSdk = Versions.COMPILE_SDK
compileSdk = ProjectProperties.Versions.COMPILE_SDK

defaultConfig {
applicationId = "com.msg.dotori"
minSdk = Versions.MIN_SDK
targetSdk = Versions.TARGET_SDK
minSdk = ProjectProperties.Versions.MIN_SDK
targetSdk = ProjectProperties.Versions.TARGET_SDK
versionCode = 1
versionName = "1.0"

Expand Down
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id(Dependency.GradlePlugin.ANDROID_APPLICATION) version Versions.GRADLE_ANDROID apply false
id(Dependency.GradlePlugin.ANDROID_LIBRARY) version Versions.GRADLE_ANDROID apply false
id(Dependency.GradlePlugin.KOTLIN_ANDROID) version Versions.GRADLE_KOTLIN apply false
id(ProjectProperties.GradlePlugin.ANDROID_APPLICATION) version Versions.GRADLE_ANDROID apply false
id(ProjectProperties.GradlePlugin.ANDROID_LIBRARY) version Versions.GRADLE_ANDROID apply false
id(ProjectProperties.GradlePlugin.KOTLIN_ANDROID) version Versions.GRADLE_KOTLIN apply false
}
19 changes: 12 additions & 7 deletions buildSrc/src/main/java/Dependency.kt
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
object Dependency {
object GradlePlugin {
const val ANDROID_APPLICATION = "com.android.application"
const val ANDROID_LIBRARY = "com.android.library"
const val KOTLIN_ANDROID = "org.jetbrains.kotlin.android"
}

object Androidx {
const val CORE_KTX = "androidx.core:core-ktx:${Versions.CORE_KTX}"
const val APP_COMPAT = "androidx.appcompat:appcompat:${Versions.APP_COMPAT}"
}


object Google {
const val MATERIAL = "com.google.android.material:material:${Versions.MATERIAL}"
}

object Libraries {
const val DUS = "com.github.Team-Ampersand:DUS:${Versions.DUS}"
}

object Compose {
const val COMPOSE_ACTIVITY = "androidx.activity:activity-compose:${Versions.ACTIVITY_COMPOSE}"
const val COMPOSE = "androidx.compose.ui:ui:${Versions.COMPOSE}"
const val COMPOSE_PREVIEW = "androidx.compose.ui:ui-tooling-preview:${Versions.COMPOSE}"
const val COMPOSE_MATERIAL = "androidx.compose.material:material:${Versions.COMPOSE_MATERIAL}"
const val COMPOSE_TOOL = "androidx.compose.ui:ui-tooling:${Versions.COMPOSE}"
}

object UnitTest {
const val JUNIT = "junit:junit:${Versions.JUNIT}"
}
Expand Down
13 changes: 13 additions & 0 deletions buildSrc/src/main/java/ProjectProperties.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
object ProjectProperties {
object GradlePlugin {
const val ANDROID_APPLICATION = "com.android.application"
const val ANDROID_LIBRARY = "com.android.library"
const val KOTLIN_ANDROID = "org.jetbrains.kotlin.android"
}

object Versions {
const val COMPILE_SDK = 33
const val MIN_SDK = 21
const val TARGET_SDK = 33
}
}
9 changes: 6 additions & 3 deletions buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ object Versions {
const val ANDROID_JUNIT = "1.1.5"
const val ESPRESSO_CORE = "3.5.1"

const val COMPILE_SDK = 33
const val MIN_SDK = 21
const val TARGET_SDK = 33
const val DUS = "1.0.3"

const val COMPOSE = "1.2.0"
const val ACTIVITY_COMPOSE = "1.3.1"
const val COMPOSE_MATERIAL = "1.2.0"
const val COMPOSE_COMPILER = "1.3.2"
}
12 changes: 6 additions & 6 deletions data/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
plugins {
id(Dependency.GradlePlugin.ANDROID_LIBRARY)
id(Dependency.GradlePlugin.KOTLIN_ANDROID)
id(ProjectProperties.GradlePlugin.ANDROID_LIBRARY)
id(ProjectProperties.GradlePlugin.KOTLIN_ANDROID)
}

android {
namespace = "com.msg.view"
compileSdk = Versions.COMPILE_SDK
namespace = "com.msg.data"
compileSdk = ProjectProperties.Versions.COMPILE_SDK

defaultConfig {
minSdk = Versions.MIN_SDK
targetSdk = Versions.TARGET_SDK
minSdk = ProjectProperties.Versions.MIN_SDK
targetSdk = ProjectProperties.Versions.TARGET_SDK

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand Down
10 changes: 5 additions & 5 deletions di/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
plugins {
id(Dependency.GradlePlugin.ANDROID_LIBRARY)
id(Dependency.GradlePlugin.KOTLIN_ANDROID)
id(ProjectProperties.GradlePlugin.ANDROID_LIBRARY)
id(ProjectProperties.GradlePlugin.KOTLIN_ANDROID)
}

android {
namespace = "com.msg.di"
compileSdk = Versions.COMPILE_SDK
compileSdk = ProjectProperties.Versions.COMPILE_SDK

defaultConfig {
minSdk = Versions.MIN_SDK
targetSdk = Versions.TARGET_SDK
minSdk = ProjectProperties.Versions.MIN_SDK
targetSdk = ProjectProperties.Versions.TARGET_SDK

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand Down
12 changes: 6 additions & 6 deletions domain/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
plugins {
id(Dependency.GradlePlugin.ANDROID_LIBRARY)
id(Dependency.GradlePlugin.KOTLIN_ANDROID)
id(ProjectProperties.GradlePlugin.ANDROID_LIBRARY)
id(ProjectProperties.GradlePlugin.KOTLIN_ANDROID)
}

android {
namespace = "com.msg.view"
compileSdk = Versions.COMPILE_SDK
namespace = "com.msg.domain"
compileSdk = ProjectProperties.Versions.COMPILE_SDK

defaultConfig {
minSdk = Versions.MIN_SDK
targetSdk = Versions.TARGET_SDK
minSdk = ProjectProperties.Versions.MIN_SDK
targetSdk = ProjectProperties.Versions.TARGET_SDK

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand Down
26 changes: 19 additions & 7 deletions presentation/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
plugins {
id(Dependency.GradlePlugin.ANDROID_LIBRARY)
id(Dependency.GradlePlugin.KOTLIN_ANDROID)
id(ProjectProperties.GradlePlugin.ANDROID_LIBRARY)
id(ProjectProperties.GradlePlugin.KOTLIN_ANDROID)
}

android {
namespace = "com.msg.view"
compileSdk = Versions.COMPILE_SDK
namespace = "com.msg.presentation"
compileSdk = ProjectProperties.Versions.COMPILE_SDK

defaultConfig {
minSdk = Versions.MIN_SDK
targetSdk = Versions.TARGET_SDK
minSdk = ProjectProperties.Versions.MIN_SDK
targetSdk = ProjectProperties.Versions.TARGET_SDK

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles("consumer-rules.pro")
Expand All @@ -28,14 +28,26 @@ android {
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = Versions.COMPOSE_COMPILER
}
}

dependencies {

implementation(Dependency.Androidx.CORE_KTX)
implementation(Dependency.Androidx.APP_COMPAT)
implementation(Dependency.Google.MATERIAL)
testImplementation(Dependency.UnitTest.JUNIT)
androidTestImplementation(Dependency.AndroidTest.ANDROID_JUNIT)
androidTestImplementation(Dependency.AndroidTest.ESPRESSO_CORE)

implementation(Dependency.Libraries.DUS)

implementation(Dependency.Compose.COMPOSE)
implementation(Dependency.Compose.COMPOSE_TOOL)
implementation(Dependency.Compose.COMPOSE_MATERIAL)
implementation(Dependency.Compose.COMPOSE_PREVIEW)
}
Empty file.
20 changes: 20 additions & 0 deletions presentation/src/main/java/com/msg/presentation/view/test.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.msg.presentation.view

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import com.dotori.dotori_components.components.button.DotoriButton

@Preview
@Composable
fun test() {
Column(modifier = Modifier.fillMaxSize(),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.Center) {
DotoriButton(text = "test") {}
}
}
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
rootProject.name = "Dotori-Android"
Expand Down

0 comments on commit cfd5aea

Please sign in to comment.