Skip to content

Commit

Permalink
update: build.gradle.kts
Browse files Browse the repository at this point in the history
  • Loading branch information
amirisback committed Apr 20, 2023
1 parent 5fd88bf commit 2a07766
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 77 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ This Is Latest Release (Still Being Developed)


## Screenshoot Apps
| UI 1 | UI 2 | UI 3 |
|:----:|:----:|:----:|
|<img width="200px" height="360px" src="docs/image/ss_1.png"> | <img width="200px" height="360px" src="docs/image/ss_2.png"> | <img width="200px" height="360px" src="docs/image/ss_3.png"> |
| UI 1 | UI 2 | UI 3 |
|:------------------------------------------------------------:|:------------------------------------------------------------:|:------------------------------------------------------------:|
| <img width="200px" height="360px" src="docs/image/ss_1.png"> | <img width="200px" height="360px" src="docs/image/ss_2.png"> | <img width="200px" height="360px" src="docs/image/ss_3.png"> |

## Architecture
- Pattern [Model-View-ViewModel](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel) (MVVM) facilitating a [separation](https://en.wikipedia.org/wiki/Separation_of_concerns) of development of the graphical user interface.
Expand Down
61 changes: 5 additions & 56 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,13 @@ android {
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
jvmTarget = "17"
}
}

Expand All @@ -111,69 +111,18 @@ android {

dependencies {

implementation(Androidx.appCompat)
implementation(Androidx.appCompatResources)
implementation(Androidx.activityKtx)
implementation(Androidx.fragmentKtx)
implementation(Androidx.constraintLayout)
implementation(Androidx.collection)
implementation(Androidx.savedState)
implementation(Androidx.viewPager2)
implementation(Androidx.preferenceKtx)

implementation(Google.material)
implementation(Google.gson)
implementation(Google.admob)

implementation(Androidx.Lifecycle.viewmodelKtx)
implementation(Androidx.Lifecycle.livedataKtx)
implementation(Androidx.Lifecycle.runtimeKtx)

implementation(Androidx.Room.ktx)
implementation(Androidx.Room.runtime)
implementation(Androidx.Room.paging)
implementation(Androidx.Room.rxJava3)

implementation(Square.OkHttp.okhttp)
implementation(Square.OkHttp.loggingInterceptor)

implementation(Square.Retrofit2.retrofit)
implementation(Square.Retrofit2.converterGson)
implementation(Square.Retrofit2.adapterRxJava3)

// Latest Version
implementation(Reactivex.rxJava3)
implementation(Reactivex.rxAndroid3)
implementation(Reactivex.rxKotlin3)

implementation(Koin.core)
implementation(Koin.android)
implementation(Koin.androidCompat)
implementation(Koin.androidxWorkManager)
implementation(Koin.androidxCompose)

implementation(Frogo.sdk)
implementation(Frogo.ui)
implementation(Frogo.consumeApi)
implementation(Frogo.recyclerView)
implementation(Frogo.admob)
implementation(Frogo.recyclerView)
implementation(Frogo.consumeApi)

implementation(GitHub.glide)
implementation(GitHub.chucker)

api(JetBrains.coroutinesCore)
api(JetBrains.coroutinesAndroid)

kapt(Androidx.Lifecycle.compiler)
kapt(Androidx.Room.compiler)
kapt(GitHub.glideCompiler)

testImplementation(Androidx.junit4)
testImplementation(Androidx.Room.roomTest)
testImplementation(Koin.test)

androidTestImplementation(Androidx.Lifecycle.coreTesting)
androidTestImplementation(Androidx.runner)
androidTestImplementation(Androidx.espressoCore)

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import com.frogobox.kickstart.databinding.FragmentConsumableBinding
import com.frogobox.kickstart.mvvm.detail.DetailActivity
import com.frogobox.recycler.core.FrogoRecyclerNotifyListener
import com.frogobox.recycler.core.IFrogoBindingAdapter
import com.frogobox.sdk.ext.progressViewHandle
import com.frogobox.sdk.ext.showToast
import com.frogobox.sdk.ext.startActivityExt
import org.koin.androidx.viewmodel.ext.android.viewModel

Expand Down Expand Up @@ -45,11 +47,11 @@ class ConsumableFragment : BaseFragment<FragmentConsumableBinding>() {
}

eventFailed.observe(requireActivity()) {
showToast(it)
requireContext().showToast(it)
}

eventShowProgressState.observe(requireActivity()) {
setupProgressView(binding.progressView, it)
binding.progressView.progressViewHandle(it)
}

}
Expand Down Expand Up @@ -135,7 +137,7 @@ class ConsumableFragment : BaseFragment<FragmentConsumableBinding>() {
position: Int,
notifyListener: FrogoRecyclerNotifyListener<Article>
) {
data.description?.let { showToast(it) }
data.description?.let { requireContext().showToast(it) }
}

override fun setViewBinding(parent: ViewGroup): ContentArticleHorizontalBinding {
Expand Down Expand Up @@ -191,7 +193,7 @@ class ConsumableFragment : BaseFragment<FragmentConsumableBinding>() {
position: Int,
notifyListener: FrogoRecyclerNotifyListener<Article>
) {
data.description?.let { showToast(it) }
data.description?.let { requireContext().showToast(it) }
}

override fun setViewBinding(parent: ViewGroup): ContentArticleVerticalBinding {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import android.widget.TextView
import com.bumptech.glide.Glide
import com.frogobox.coreapi.news.model.Article
import com.frogobox.kickstart.R

import com.frogobox.kickstart.core.BaseFragment
import com.frogobox.kickstart.databinding.FragmentMainBinding
import com.frogobox.kickstart.mvvm.detail.DetailActivity
import com.frogobox.recycler.core.FrogoRecyclerNotifyListener
import com.frogobox.recycler.core.IFrogoViewAdapter
import com.frogobox.sdk.ext.progressViewHandle
import com.frogobox.sdk.ext.startActivityExt
import org.koin.androidx.viewmodel.ext.android.viewModel

Expand All @@ -38,7 +38,7 @@ class MainFragment : BaseFragment<FragmentMainBinding>() {
}

eventShowProgressState.observe(requireActivity()) {
setupProgressView(binding.progressView, it)
binding.progressView.progressViewHandle(it)
}

}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "7.4.1" apply false
id("com.android.library") version "7.4.1" apply false
id("com.android.application") version "8.0.0" apply false
id("com.android.library") version "8.0.0" apply false
id("org.jetbrains.kotlin.android") version DependencyGradle.KOTLIN_VERSION apply false
}

Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ repositories {
}

dependencies{
implementation("com.github.frogobox:open-build-src:2.0.9")
implementation("com.github.frogobox:frogo-build-src:1.3.8")
implementation("com.github.frogobox:open-build-src:2.1.6")
implementation("com.github.frogobox:frogo-build-src:1.4.3")
}
9 changes: 4 additions & 5 deletions buildSrc/src/main/kotlin/ProjectSetting.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ object ProjectSetting {

const val APP_DOMAIN = "com"
const val APP_PLAY_CONSOLE = "frogobox"
val APP_NAME = NAME_APP.toLowerCase().replace(" ", "").replace(" ", "-")
val APP_NAME = NAME_APP.lowercase().replace(" ", "").replace(" ", "-")

// ---------------------------------------------------------------------------------------------

Expand All @@ -37,14 +37,13 @@ object ProjectSetting {

val PROJECT_APP_ID = "$BASE_PACAKGE_NAME.$APP_NAME"

const val PROJECT_VERSION_CODE =
(VERSION_MAJOR * 100) + (VERSION_MINOR * 10) + (VERSION_PATCH * 1)
const val PROJECT_VERSION_CODE = (VERSION_MAJOR * 100) + (VERSION_MINOR * 10) + (VERSION_PATCH * 1)
const val PROJECT_VERSION_NAME = "$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH"

// ---------------------------------------------------------------------------------------------

val NAME_APK = NAME_APP.toLowerCase().replace(" ", "-")
val NAME_DB = NAME_APP.toLowerCase().replace(" ", "_")
val NAME_APK = NAME_APP.lowercase().replace(" ", "-")
val NAME_DB = NAME_APP.lowercase().replace(" ", "_")
val DB = "\"$NAME_DB.db\""
val PREF = "\"pref_$NAME_DB\""

Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ android.useAndroidX=true
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
2 changes: 0 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ pluginManagement {
gradlePluginPortal()
google()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven { url = uri("https://jitpack.io") }
}
}
Expand All @@ -13,7 +12,6 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
maven { url = uri("https://jitpack.io") }
}
}
Expand Down

0 comments on commit 2a07766

Please sign in to comment.