From 474ed831c0dfbb967b4050f0542b6d67eceeec6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 7 Dec 2023 12:08:51 +0900 Subject: [PATCH] =?UTF-8?q?:ui:home=20=E3=83=A2=E3=82=B8=E3=83=A5=E3=83=BC?= =?UTF-8?q?=E3=83=AB=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/gradle.xml | 2 ++ app/build.gradle | 20 +++++++++++ build.gradle | 1 + settings.gradle | 1 + ui/home/.gitignore | 1 + ui/home/build.gradle | 35 +++++++++++++++++++ ui/home/consumer-rules.pro | 0 ui/home/proguard-rules.pro | 21 +++++++++++ .../nem/ui/home/ExampleInstrumentedTest.java | 26 ++++++++++++++ ui/home/src/main/AndroidManifest.xml | 4 +++ .../java/one/nem/ui/home/ExampleUnitTest.java | 17 +++++++++ 11 files changed, 128 insertions(+) create mode 100644 ui/home/.gitignore create mode 100644 ui/home/build.gradle create mode 100644 ui/home/consumer-rules.pro create mode 100644 ui/home/proguard-rules.pro create mode 100644 ui/home/src/androidTest/java/one/nem/ui/home/ExampleInstrumentedTest.java create mode 100644 ui/home/src/main/AndroidManifest.xml create mode 100644 ui/home/src/test/java/one/nem/ui/home/ExampleUnitTest.java diff --git a/.idea/gradle.xml b/.idea/gradle.xml index ae388c2a..2cd18150 100644 --- a/.idea/gradle.xml +++ b/.idea/gradle.xml @@ -12,6 +12,8 @@ diff --git a/app/build.gradle b/app/build.gradle index 1b7a7bd6..3e3c6634 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,4 +42,24 @@ dependencies { implementation "com.google.dagger:hilt-android:2.44" annotationProcessor "com.google.dagger:hilt-compiler:2.44" + // Navigation Component + def nav_version = "2.5.3" + + // Java language implementation + implementation "androidx.navigation:navigation-fragment:$nav_version" + implementation "androidx.navigation:navigation-ui:$nav_version" + + // Kotlin + implementation "androidx.navigation:navigation-fragment-ktx:$nav_version" + implementation "androidx.navigation:navigation-ui-ktx:$nav_version" + + // Feature module Support + implementation "androidx.navigation:navigation-dynamic-features-fragment:$nav_version" + + // Testing Navigation + androidTestImplementation "androidx.navigation:navigation-testing:$nav_version" + + // Jetpack Compose Integration + implementation "androidx.navigation:navigation-compose:$nav_version" + } \ No newline at end of file diff --git a/build.gradle b/build.gradle index 11805890..e06cad1c 100644 --- a/build.gradle +++ b/build.gradle @@ -2,4 +2,5 @@ plugins { id 'com.android.application' version '8.0.2' apply false id 'com.google.dagger.hilt.android' version '2.44' apply false + id 'com.android.library' version '8.0.2' apply false } \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 4558e391..f3305831 100644 --- a/settings.gradle +++ b/settings.gradle @@ -15,3 +15,4 @@ dependencyResolutionManagement { rootProject.name = "Lacerta" include ':app' +include ':ui:home' diff --git a/ui/home/.gitignore b/ui/home/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/ui/home/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/ui/home/build.gradle b/ui/home/build.gradle new file mode 100644 index 00000000..d24315d0 --- /dev/null +++ b/ui/home/build.gradle @@ -0,0 +1,35 @@ +plugins { + id 'com.android.library' +} + +android { + namespace 'one.nem.ui.home' + compileSdk 33 + + defaultConfig { + minSdk 26 + + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles "consumer-rules.pro" + } + + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +dependencies { + + implementation 'androidx.appcompat:appcompat:1.6.1' + implementation 'com.google.android.material:material:1.10.0' + testImplementation 'junit:junit:4.13.2' + androidTestImplementation 'androidx.test.ext:junit:1.1.5' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' +} \ No newline at end of file diff --git a/ui/home/consumer-rules.pro b/ui/home/consumer-rules.pro new file mode 100644 index 00000000..e69de29b diff --git a/ui/home/proguard-rules.pro b/ui/home/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/ui/home/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile \ No newline at end of file diff --git a/ui/home/src/androidTest/java/one/nem/ui/home/ExampleInstrumentedTest.java b/ui/home/src/androidTest/java/one/nem/ui/home/ExampleInstrumentedTest.java new file mode 100644 index 00000000..1555f943 --- /dev/null +++ b/ui/home/src/androidTest/java/one/nem/ui/home/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package one.nem.ui.home; + +import android.content.Context; + +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.ext.junit.runners.AndroidJUnit4; + +import org.junit.Test; +import org.junit.runner.RunWith; + +import static org.junit.Assert.*; + +/** + * Instrumented test, which will execute on an Android device. + * + * @see Testing documentation + */ +@RunWith(AndroidJUnit4.class) +public class ExampleInstrumentedTest { + @Test + public void useAppContext() { + // Context of the app under test. + Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); + assertEquals("one.nem.ui.home.test", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/ui/home/src/main/AndroidManifest.xml b/ui/home/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a5918e68 --- /dev/null +++ b/ui/home/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/ui/home/src/test/java/one/nem/ui/home/ExampleUnitTest.java b/ui/home/src/test/java/one/nem/ui/home/ExampleUnitTest.java new file mode 100644 index 00000000..8087a7f8 --- /dev/null +++ b/ui/home/src/test/java/one/nem/ui/home/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package one.nem.ui.home; + +import org.junit.Test; + +import static org.junit.Assert.*; + +/** + * Example local unit test, which will execute on the development machine (host). + * + * @see Testing documentation + */ +public class ExampleUnitTest { + @Test + public void addition_isCorrect() { + assertEquals(4, 2 + 2); + } +} \ No newline at end of file