-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2. Created jetpack compose app Signed-off-by: Rajesh Hadiya <[email protected]>
- Loading branch information
1 parent
bc4c5a1
commit 8caede7
Showing
62 changed files
with
1,313 additions
and
73 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,12 +4,13 @@ plugins { | |
} | ||
|
||
android { | ||
compileSdk = 31 | ||
namespace = "com.hadiyarajesh.flower" | ||
compileSdk = 32 | ||
buildToolsVersion = "30.0.3" | ||
|
||
defaultConfig { | ||
minSdk = 21 | ||
targetSdk = 30 | ||
targetSdk = 32 | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
consumerProguardFiles( | ||
|
@@ -19,7 +20,7 @@ android { | |
|
||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = true | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
|
@@ -37,12 +38,8 @@ android { | |
} | ||
} | ||
|
||
tasks.register("sourceJar", Jar::class) { | ||
|
||
} | ||
|
||
dependencies { | ||
implementation("androidx.core:core-ktx:1.7.0") | ||
implementation("androidx.core:core-ktx:1.8.0") | ||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1") | ||
implementation("com.squareup.retrofit2:retrofit:2.9.0") | ||
|
||
|
@@ -51,8 +48,21 @@ dependencies { | |
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0") | ||
} | ||
|
||
tasks.register("sourceJar", Jar::class) { | ||
} | ||
|
||
val PUBLISH_GROUP_ID by extra("io.github.hadiyarajesh") | ||
val PUBLISH_VERSION by extra("2.0.1") | ||
val PUBLISH_VERSION by extra("2.0.3") | ||
val PUBLISH_ARTIFACT_ID by extra("flower") | ||
val PUBLISH_DESCRIPTION by extra("Flower is an Android library that makes networking and database caching easy. It enables developers to fetch network resources and use them as is OR combine them with local database at single place with fault tolerant architecture.") | ||
val PUBLISH_URL by extra("https://github.com/hadiyarajesh/flower") | ||
val PUBLISH_LICENSE_NAME by extra("MIT License") | ||
val PUBLISH_LICENSE_URL by extra("https://github.com/hadiyarajesh/flower/blob/master/LICENSE") | ||
val PUBLISH_DEVELOPER_ID by extra("hadiyarajesh") | ||
val PUBLISH_DEVELOPER_NAME by extra("Rajesh Hadiya") | ||
val PUBLISH_DEVELOPER_EMAIL by extra("[email protected]") | ||
val PUBLISH_SCM_CONNECTION by extra("scm:git:github.com/hadiyarajesh/flower.git") | ||
val PUBLISH_SCM_DEVELOPER_CONNECTION by extra("scm:git:ssh://github.com/hadiyarajesh/flower.git") | ||
val PUBLISH_SCM_URL by extra("https://github.com/hadiyarajesh/flower") | ||
|
||
apply(from = "${rootDir}/scripts/publish-module.gradle") | ||
apply(from = "${rootDir}/scripts/publish-module.gradle") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<manifest package="com.hadiyarajesh.flower" /> | ||
<manifest /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
plugins { | ||
id("com.android.application") | ||
id("org.jetbrains.kotlin.android") | ||
id("dagger.hilt.android.plugin") | ||
kotlin("kapt") | ||
} | ||
|
||
android { | ||
namespace = "com.hadiyarajesh.compose_app" | ||
compileSdk = 32 | ||
|
||
defaultConfig { | ||
applicationId = "com.hadiyarajesh.compose_app" | ||
minSdk = 21 | ||
targetSdk = 32 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
|
||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" | ||
vectorDrawables { | ||
useSupportLibrary = true | ||
} | ||
|
||
javaCompileOptions { | ||
annotationProcessorOptions { | ||
arguments += mapOf( | ||
"room.schemaLocation" to "$projectDir/schemas", | ||
"room.incremental" to "true", | ||
"room.expandProjection" to "true" | ||
) | ||
} | ||
} | ||
} | ||
|
||
buildTypes { | ||
release { | ||
isMinifyEnabled = false | ||
proguardFiles( | ||
getDefaultProguardFile("proguard-android-optimize.txt"), | ||
"proguard-rules.pro" | ||
) | ||
} | ||
} | ||
compileOptions { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
buildFeatures { | ||
compose = true | ||
} | ||
composeOptions { | ||
kotlinCompilerExtensionVersion = "1.1.1" | ||
} | ||
packagingOptions { | ||
resources { | ||
excludes += "/META-INF/{AL2.0,LGPL2.1}" | ||
} | ||
} | ||
} | ||
|
||
object LibVersion { | ||
const val composeVersion = "1.2.0-beta03" | ||
const val roomVersion = "2.4.2" | ||
const val retrofitVersion = "2.9.0" | ||
const val moshiVersion = "1.13.0" | ||
const val accompanistVersion = "0.24.10-beta" | ||
} | ||
|
||
dependencies { | ||
implementation("androidx.core:core-ktx:1.8.0") | ||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.1") | ||
implementation("androidx.activity:activity-compose:1.4.0") | ||
implementation("androidx.compose.ui:ui:${LibVersion.composeVersion}") | ||
implementation("androidx.compose.ui:ui-tooling-preview:${LibVersion.composeVersion}") | ||
implementation("androidx.compose.material:material:${LibVersion.composeVersion}") | ||
implementation("androidx.navigation:navigation-compose:2.4.2") | ||
implementation("androidx.paging:paging-compose:1.0.0-alpha15") | ||
|
||
implementation("androidx.hilt:hilt-navigation-compose:1.0.0") | ||
implementation("com.google.dagger:hilt-android:${rootProject.extra["hiltVersion"]}") | ||
kapt("com.google.dagger:hilt-android-compiler:${rootProject.extra["hiltVersion"]}") | ||
|
||
implementation("androidx.room:room-ktx:${LibVersion.roomVersion}") | ||
implementation("androidx.room:room-paging:${LibVersion.roomVersion}") | ||
kapt("androidx.room:room-compiler:${LibVersion.roomVersion}") | ||
|
||
implementation("io.coil-kt:coil-compose:2.0.0") | ||
|
||
implementation("com.squareup.retrofit2:retrofit:${LibVersion.retrofitVersion}") | ||
implementation("com.squareup.retrofit2:converter-moshi:${LibVersion.retrofitVersion}") | ||
implementation("com.squareup.okhttp3:logging-interceptor:4.9.3") | ||
|
||
implementation("com.squareup.moshi:moshi:${LibVersion.moshiVersion}") | ||
kapt("com.squareup.moshi:moshi-kotlin-codegen:${LibVersion.moshiVersion}") | ||
|
||
implementation("com.google.accompanist:accompanist-swiperefresh:${LibVersion.accompanistVersion}") | ||
|
||
implementation(project(":Flower")) | ||
|
||
testImplementation("junit:junit:4.13.2") | ||
androidTestImplementation("androidx.test.ext:junit:1.1.3") | ||
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0") | ||
androidTestImplementation("androidx.compose.ui:ui-test-junit4:${rootProject.extra["compose_ui_version"]}") | ||
debugImplementation("androidx.compose.ui:ui-tooling:${rootProject.extra["compose_ui_version"]}") | ||
debugImplementation("androidx.compose.ui:ui-test-manifest:${rootProject.extra["compose_ui_version"]}") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
22 changes: 22 additions & 0 deletions
22
compose-app/src/androidTest/java/com/hadiyarajesh/compose_app/ExampleInstrumentedTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.hadiyarajesh.compose_app | ||
|
||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
import androidx.test.platform.app.InstrumentationRegistry | ||
import org.junit.Assert.assertEquals | ||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* See [testing documentation](http://d.android.com/tools/testing). | ||
*/ | ||
@RunWith(AndroidJUnit4::class) | ||
class ExampleInstrumentedTest { | ||
@Test | ||
fun useAppContext() { | ||
// Context of the app under test. | ||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext | ||
assertEquals("com.hadiyarajesh.compose_app", appContext.packageName) | ||
} | ||
} |
Oops, something went wrong.