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