Skip to content

Commit

Permalink
Merge pull request #270 from AllanWang/versions
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanWang committed Nov 18, 2021
2 parents e2ac8e3 + a9b8b69 commit 4c06d0a
Show file tree
Hide file tree
Showing 56 changed files with 421 additions and 302 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ abstract class AboutActivityBase(val rClass: Class<*>?) :
aboutIndicator.setViewPager(aboutPager)
aboutDraggableFrame.addListener(object :
ElasticDragDismissFrameLayout.SystemChromeFader(this@AboutActivityBase) {
override fun onDragDismissed() {
window.returnTransition = TransitionInflater.from(this@AboutActivityBase)
override fun onDragDismissed() {
window.returnTransition = TransitionInflater.from(this@AboutActivityBase)
.inflateTransition(if (aboutDraggableFrame.translationY > 0) R.transition.kau_exit_slide_bottom else R.transition.kau_exit_slide_top)
panels[currentPage].recycler?.stopScroll()
finishAfterTransition()
}
})
panels[currentPage].recycler?.stopScroll()
finishAfterTransition()
}
})
panels.forEachIndexed { index, contract -> contract.loadItems(this@AboutActivityBase, index) }
}

Expand Down
8 changes: 5 additions & 3 deletions about/src/main/kotlin/ca/allanwang/kau/about/AboutBinder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ import ca.allanwang.kau.utils.withSceneTransitionAnimation
* About activity launcher
*/
inline fun <reified T : AboutActivityBase> Context.kauLaunchAbout() =
startActivity<T>(bundleBuilder = {
withSceneTransitionAnimation(this@kauLaunchAbout)
})
startActivity<T>(
bundleBuilder = {
withSceneTransitionAnimation(this@kauLaunchAbout)
}
)
22 changes: 12 additions & 10 deletions about/src/main/kotlin/ca/allanwang/kau/about/AboutPanelDelegate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ import ca.allanwang.kau.utils.withMarginDecoration
import ca.allanwang.kau.xml.kauParseFaq
import com.mikepenz.aboutlibraries.Libs
import com.mikepenz.fastadapter.GenericItem
import java.lang.reflect.Field
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import java.lang.reflect.Field

/**
* Created by Allan Wang on 2017-08-02.
Expand Down Expand Up @@ -154,16 +154,18 @@ open class AboutPanelMain : AboutPanelRecycler() {
with(activity) {
adapter = FastItemThemedAdapter(configs)
recycler = fullLinearRecycler(adapter)
adapter.add(CutoutIItem {
with(configs) {
text = string(cutoutTextRes, cutoutText)
drawable = drawable(cutoutDrawableRes, cutoutDrawable)
if (configs.cutoutForeground != null) foregroundColor =
configs.cutoutForeground!!
adapter.add(
CutoutIItem {
with(configs) {
text = string(cutoutTextRes, cutoutText)
drawable = drawable(cutoutDrawableRes, cutoutDrawable)
if (configs.cutoutForeground != null) foregroundColor =
configs.cutoutForeground!!
}
}.apply {
themeEnabled = configs.cutoutForeground == null
}
}.apply {
themeEnabled = configs.cutoutForeground == null
})
)
postInflateMainPage(adapter)
return recycler!!
}
Expand Down
8 changes: 5 additions & 3 deletions about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ import ca.allanwang.kau.ui.views.CutoutView
*
* Just a cutout item with some defaults in [R.layout.kau_iitem_cutout]
*/
class CutoutIItem(val config: CutoutView.() -> Unit = {}) : KauIItem<CutoutIItem.ViewHolder>(
R.layout.kau_iitem_cutout, ::ViewHolder, R.id.kau_item_cutout
), ThemableIItem by ThemableIItemDelegate() {
class CutoutIItem(val config: CutoutView.() -> Unit = {}) :
KauIItem<CutoutIItem.ViewHolder>(
R.layout.kau_iitem_cutout, ::ViewHolder, R.id.kau_item_cutout
),
ThemableIItem by ThemableIItemDelegate() {

override var isSelectable: Boolean
get() = false
Expand Down
8 changes: 5 additions & 3 deletions about/src/main/kotlin/ca/allanwang/kau/about/FaqIItem.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ import com.mikepenz.fastadapter.select.getSelectExtension
/**
* Created by Allan Wang on 2017-08-02.
*/
class FaqIItem(val content: FaqItem) : KauIItem<FaqIItem.ViewHolder>(
R.layout.kau_iitem_faq, ::ViewHolder, R.id.kau_item_faq
), ThemableIItem by ThemableIItemDelegate() {
class FaqIItem(val content: FaqItem) :
KauIItem<FaqIItem.ViewHolder>(
R.layout.kau_iitem_faq, ::ViewHolder, R.id.kau_item_faq
),
ThemableIItem by ThemableIItemDelegate() {

companion object {
fun bindEvents(fastAdapter: FastAdapter<GenericItem>) {
Expand Down
8 changes: 5 additions & 3 deletions about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ import com.mikepenz.fastadapter.select.getSelectExtension
/**
* Created by Allan Wang on 2017-06-27.
*/
class LibraryIItem(val lib: Library) : KauIItem<LibraryIItem.ViewHolder>(
R.layout.kau_iitem_library, ::ViewHolder, R.id.kau_item_library
), ThemableIItem by ThemableIItemDelegate() {
class LibraryIItem(val lib: Library) :
KauIItem<LibraryIItem.ViewHolder>(
R.layout.kau_iitem_library, ::ViewHolder, R.id.kau_item_library
),
ThemableIItem by ThemableIItemDelegate() {

companion object {
fun bindEvents(fastAdapter: FastAdapter<GenericItem>) {
Expand Down
9 changes: 0 additions & 9 deletions buildSrc/src/main/kotlin/kau/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@ object Dependencies {
@JvmField
val kotlinReflect = kotlin("reflect")

@JvmField
val koin = koin("android")

@JvmField
val koinTest = koin("test")

@JvmStatic
fun koin(type: String) = "io.insert-koin:koin-$type:${Versions.koin}"

@JvmField
val hilt = "com.google.dagger:hilt-android:${Versions.hilt}"

Expand Down
44 changes: 22 additions & 22 deletions buildSrc/src/main/kotlin/kau/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import org.gradle.api.JavaVersion
object Versions {
const val coreMinSdk = 19
const val minSdk = 21
const val targetSdk = 30
const val targetSdk = 31

val java = JavaVersion.VERSION_1_8

// https://mvnrepository.com/artifact/androidx.appcompat/appcompat?repo=google
const val appcompat = "1.3.0-rc01"
const val appcompat = "1.4.0-rc01"

// https://mvnrepository.com/artifact/com.google.android.material/material
const val googleMaterial = "1.3.0"
const val googleMaterial = "1.5.0-beta01"

// https://mvnrepository.com/artifact/androidx.recyclerview/recyclerview
const val recyclerView = "1.2.0"
Expand All @@ -25,19 +25,19 @@ object Versions {
const val cardView = "1.0.0"

// https://mvnrepository.com/artifact/androidx.constraintlayout/constraintlayout
const val constraintLayout = "2.1.0"
const val constraintLayout = "2.1.1"

// https://mvnrepository.com/artifact/androidx.core/core-ktx
const val coreKtx = "1.6.0"
const val coreKtx = "1.7.0"

// https://kotlinlang.org/docs/reference/using-gradle.html
const val kotlin = "1.5.30"
const val kotlin = "1.6.0"

// https://github.com/Kotlin/kotlinx.coroutines/releases
const val coroutines = "1.5.0"
const val coroutines = "1.5.2"

// https://github.com/mikepenz/AboutLibraries/releases
const val aboutLibraries = "8.9.0"
const val aboutLibraries = "8.9.4"

// Keep old version
// https://github.com/wasabeef/Blurry/releases
Expand All @@ -50,20 +50,17 @@ object Versions {
const val glide = "4.12.0"

// https://github.com/mikepenz/Android-Iconics#1-provide-the-gradle-dependency
const val iconics = "5.3.0"
const val iconicsGoogle = "4.0.0.1"
const val iconics = "5.3.2"
const val iconicsGoogle = "4.0.0.2"
const val iconicsMaterial = "2.2.0.8"
const val iconicsCommunity = "5.8.55.0"

// https://github.com/afollestad/material-dialogs/releases
const val materialDialog = "3.3.0"

// https://github.com/InsertKoinIO/koin/blob/master/CHANGELOG.md
const val koin = "3.1.0"

// https://github.com/google/dagger/releases
// https://mvnrepository.com/artifact/com.google.dagger/hilt-android
const val hilt = "2.37"
const val hilt = "2.39.1"

// https://mvnrepository.com/artifact/androidx.ui/ui-core?repo=google
const val compose = "0.1.0-dev14"
Expand All @@ -72,7 +69,7 @@ object Versions {
const val leakCanary = "2.7"

// https://mvnrepository.com/artifact/androidx.test.espresso/espresso-core?repo=google
const val espresso = "3.3.0"
const val espresso = "3.4.0"

// https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api
const val junit = "4.13"
Expand All @@ -81,25 +78,28 @@ object Versions {
const val testRunner = "1.1.2"

// https://mvnrepository.com/artifact/androidx.test/rules?repo=google
const val testRules = "1.3.0"
const val testRules = "1.4.0"

// https://github.com/diffplug/spotless/blob/master/plugin-gradle/CHANGES.md
const val spotless = "5.7.0"
const val spotless = "5.15.0"

// https://github.com/pinterest/ktlint/releases
const val ktlint = "0.41.0"

// https://github.com/bugsnag/bugsnag-android/releases
const val bugsnag = "5.12.0"
const val bugsnag = "5.15.0"

// https://github.com/bugsnag/bugsnag-android-gradle-plugin/releases
const val bugsnagPlugin = "7.0.0"
const val bugsnagPlugin = "7.1.0"

// https://mvnrepository.com/artifact/com.android.tools.build/gradle?repo=google
const val gradlePlugin = "7.1.0-alpha05"
const val gradlePlugin = "7.1.0-beta03"

// https://github.com/Triple-T/gradle-play-publisher/releases
const val playPublishPlugin = "3.4.0-agp7.0"
const val playPublishPlugin = "3.6.0"

// https://github.com/KeepSafe/dexcount-gradle-plugin/releases
const val dexCountPlugin = "3.0.0"
const val dexCountPlugin = "3.0.1"

// https://github.com/gladed/gradle-android-git-version/releases
const val gitVersionPlugin = "0.4.14"
Expand Down

0 comments on commit 4c06d0a

Please sign in to comment.