Skip to content

Commit 8d71d84

Browse files
committed
chore(Slider): Setup slider module
1 parent 3201056 commit 8d71d84

File tree

9 files changed

+104
-0
lines changed

9 files changed

+104
-0
lines changed

.idea/gradle.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

settings.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ dependencyResolutionManagement {
2323
rootProject.name = "Mosaic"
2424
include(":demo")
2525
include(":lib")
26+
include(":slider")

slider/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

slider/build.gradle.kts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
plugins {
2+
alias(libs.plugins.android.library)
3+
alias(libs.plugins.kotlin.android)
4+
alias(libs.plugins.mosaic.library)
5+
}
6+
7+
android {
8+
namespace = "io.monstarlab.mosaic.slider"
9+
defaultConfig {
10+
consumerProguardFiles("consumer-rules.pro")
11+
}
12+
13+
buildTypes {
14+
release {
15+
isMinifyEnabled = false
16+
proguardFiles(
17+
getDefaultProguardFile("proguard-android-optimize.txt"),
18+
"proguard-rules.pro"
19+
)
20+
}
21+
}
22+
}
23+
24+
kotlin {
25+
jvmToolchain(17)
26+
}
27+
28+
dependencies {
29+
30+
implementation(libs.androidx.core.ktx)
31+
implementation(platform(libs.compose.bom))
32+
implementation(libs.compose.ui)
33+
implementation(libs.compose.ui.tooling.preview)
34+
testImplementation(libs.junit)
35+
androidTestImplementation(libs.androidx.junit)
36+
androidTestImplementation(libs.androidx.espresso.core)
37+
}

slider/consumer-rules.pro

Whitespace-only changes.

slider/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package io.monstarlab.mosaic.slider
2+
3+
import androidx.test.platform.app.InstrumentationRegistry
4+
import androidx.test.ext.junit.runners.AndroidJUnit4
5+
6+
import org.junit.Test
7+
import org.junit.runner.RunWith
8+
9+
import org.junit.Assert.*
10+
11+
/**
12+
* Instrumented test, which will execute on an Android device.
13+
*
14+
* See [testing documentation](http://d.android.com/tools/testing).
15+
*/
16+
@RunWith(AndroidJUnit4::class)
17+
class ExampleInstrumentedTest {
18+
@Test
19+
fun useAppContext() {
20+
// Context of the app under test.
21+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
22+
assertEquals("io.monstarlab.mosaic.slider.test", appContext.packageName)
23+
}
24+
}

slider/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest/>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package io.monstarlab.mosaic.slider
2+
3+
import org.junit.Test
4+
5+
import org.junit.Assert.*
6+
7+
/**
8+
* Example local unit test, which will execute on the development machine (host).
9+
*
10+
* See [testing documentation](http://d.android.com/tools/testing).
11+
*/
12+
class ExampleUnitTest {
13+
@Test
14+
fun addition_isCorrect() {
15+
assertEquals(4, 2 + 2)
16+
}
17+
}

0 commit comments

Comments
 (0)