Skip to content

Commit 73bf732

Browse files
Merge branch 'feature/image-lib-gradle' into develop
2 parents ae2bea5 + 679ce00 commit 73bf732

File tree

9 files changed

+132
-0
lines changed

9 files changed

+132
-0
lines changed

app/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ android {
4848

4949
dependencies {
5050

51+
implementation project(':image')
52+
5153
implementation 'androidx.core:core-ktx:1.8.0'
5254
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.4.1'
5355

image/.gitignore

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

image/build.gradle

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
plugins {
2+
id 'com.android.library'
3+
id 'org.jetbrains.kotlin.android'
4+
}
5+
6+
android {
7+
namespace 'com.smarttoolfactory.image'
8+
compileSdk 32
9+
10+
defaultConfig {
11+
minSdk 21
12+
targetSdk 32
13+
14+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15+
consumerProguardFiles "consumer-rules.pro"
16+
}
17+
18+
buildTypes {
19+
release {
20+
minifyEnabled false
21+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
22+
}
23+
}
24+
compileOptions {
25+
sourceCompatibility JavaVersion.VERSION_1_8
26+
targetCompatibility JavaVersion.VERSION_1_8
27+
}
28+
kotlinOptions {
29+
jvmTarget = '1.8'
30+
}
31+
buildFeatures {
32+
compose true
33+
}
34+
composeOptions {
35+
kotlinCompilerExtensionVersion compose_version
36+
}
37+
38+
packagingOptions {
39+
resources {
40+
excludes += '/META-INF/{AL2.0,LGPL2.1}'
41+
}
42+
}
43+
}
44+
45+
dependencies {
46+
47+
implementation 'androidx.core:core-ktx:1.8.0'
48+
49+
implementation 'com.github.SmartToolFactory:Compose-Extended-Gestures:1.2.0'
50+
51+
// Jetpack Compose
52+
implementation "androidx.compose.ui:ui:$compose_version"
53+
implementation "androidx.compose.ui:ui-tooling:$compose_version"
54+
implementation "androidx.compose.material:material:$compose_version"
55+
implementation "androidx.compose.runtime:runtime:$compose_version"
56+
57+
testImplementation 'junit:junit:4.13.2'
58+
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
59+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
60+
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
61+
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
62+
}

image/consumer-rules.pro

Whitespace-only changes.

image/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 com.smarttoolfactory.image
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("com.smarttoolfactory.image.test", appContext.packageName)
23+
}
24+
}

image/src/main/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest>
3+
4+
</manifest>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package com.smarttoolfactory.image
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+
}

settings.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ dependencyResolutionManagement {
1414
}
1515
rootProject.name = "Compose Image"
1616
include ':app'
17+
include ':image'

0 commit comments

Comments
 (0)