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/feature/home/.gitignore b/feature/home/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/feature/home/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/feature/home/build.gradle b/feature/home/build.gradle new file mode 100644 index 00000000..4ab67ca9 --- /dev/null +++ b/feature/home/build.gradle @@ -0,0 +1,35 @@ +plugins { + id 'com.android.library' +} + +android { + namespace 'one.nem.lacerta.feature.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/feature/home/consumer-rules.pro b/feature/home/consumer-rules.pro new file mode 100644 index 00000000..e69de29b diff --git a/feature/home/proguard-rules.pro b/feature/home/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/feature/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/feature/home/src/androidTest/java/one/nem/lacerta/feature/home/ExampleInstrumentedTest.java b/feature/home/src/androidTest/java/one/nem/lacerta/feature/home/ExampleInstrumentedTest.java new file mode 100644 index 00000000..19b502d9 --- /dev/null +++ b/feature/home/src/androidTest/java/one/nem/lacerta/feature/home/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package one.nem.lacerta.feature.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.lacerta.feature.home.test", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/feature/home/src/main/AndroidManifest.xml b/feature/home/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a5918e68 --- /dev/null +++ b/feature/home/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/feature/home/src/test/java/one/nem/lacerta/feature/home/ExampleUnitTest.java b/feature/home/src/test/java/one/nem/lacerta/feature/home/ExampleUnitTest.java new file mode 100644 index 00000000..27f2f2aa --- /dev/null +++ b/feature/home/src/test/java/one/nem/lacerta/feature/home/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package one.nem.lacerta.feature.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 diff --git a/feature/search/.gitignore b/feature/search/.gitignore new file mode 100644 index 00000000..42afabfd --- /dev/null +++ b/feature/search/.gitignore @@ -0,0 +1 @@ +/build \ No newline at end of file diff --git a/feature/search/build.gradle b/feature/search/build.gradle new file mode 100644 index 00000000..b92bd0d5 --- /dev/null +++ b/feature/search/build.gradle @@ -0,0 +1,35 @@ +plugins { + id 'com.android.library' +} + +android { + namespace 'one.nem.lacerta.feature.search' + 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/feature/search/consumer-rules.pro b/feature/search/consumer-rules.pro new file mode 100644 index 00000000..e69de29b diff --git a/feature/search/proguard-rules.pro b/feature/search/proguard-rules.pro new file mode 100644 index 00000000..481bb434 --- /dev/null +++ b/feature/search/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/feature/search/src/androidTest/java/one/nem/lacerta/feature/search/ExampleInstrumentedTest.java b/feature/search/src/androidTest/java/one/nem/lacerta/feature/search/ExampleInstrumentedTest.java new file mode 100644 index 00000000..abd9c277 --- /dev/null +++ b/feature/search/src/androidTest/java/one/nem/lacerta/feature/search/ExampleInstrumentedTest.java @@ -0,0 +1,26 @@ +package one.nem.lacerta.feature.search; + +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.lacerta.feature.search.test", appContext.getPackageName()); + } +} \ No newline at end of file diff --git a/feature/search/src/main/AndroidManifest.xml b/feature/search/src/main/AndroidManifest.xml new file mode 100644 index 00000000..a5918e68 --- /dev/null +++ b/feature/search/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/feature/search/src/test/java/one/nem/lacerta/feature/search/ExampleUnitTest.java b/feature/search/src/test/java/one/nem/lacerta/feature/search/ExampleUnitTest.java new file mode 100644 index 00000000..ea6772fe --- /dev/null +++ b/feature/search/src/test/java/one/nem/lacerta/feature/search/ExampleUnitTest.java @@ -0,0 +1,17 @@ +package one.nem.lacerta.feature.search; + +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 diff --git a/settings.gradle b/settings.gradle index 4558e391..6a31ce2b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -15,3 +15,5 @@ dependencyResolutionManagement { rootProject.name = "Lacerta" include ':app' +include ':feature:home' +include ':feature:search'