Skip to content

Commit

Permalink
v 1.0.6
Browse files Browse the repository at this point in the history
1. added instrumental test
2. renamed vm with getMVBVm
3. changed convertIfIsParcelableArray to ConvertToActual
4. undid Bundle
5. optimized save.kt and Saver.kt
6. add Container for rmb
7. changed MVBViewModel functions with operators.
8. optimized the writing style in MVBData
9. renamed a function with `convertIfIsParcelableArray`.
  • Loading branch information
WilliamKwokX committed Sep 19, 2023
1 parent 7ebd245 commit b4bb787
Show file tree
Hide file tree
Showing 59 changed files with 904 additions and 494 deletions.
249 changes: 249 additions & 0 deletions .idea/androidTestResultsUserPreferences.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,26 @@ android {
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding true
packagingOptions {
exclude 'META-INF/*'
}
}

dependencies {
implementation libs.coreKtx
implementation libs.appcompat
implementation(libs.bundles.shawxing)
implementation libs.lifecycle.runtimeKtx
implementation libs.lifecycle.viewmodel.ktx
implementation libs.coreKtx

testImplementation libs.junit
androidTestImplementation(libs.androidx.fragment.test)
// androidTestImplementation libs.mockito.core
// androidTestImplementation libs.bytebuddy.android
// androidTestImplementation libs.mockito.inline
androidTestImplementation libs.mockito.android
androidTestImplementation libs.mockk
androidTestImplementation libs.kotlin.test
androidTestImplementation libs.junit
androidTestImplementation libs.androidx.fragment.test
androidTestImplementation libs.androidx.test.ext.junit
androidTestImplementation libs.espresso.core
}
Expand All @@ -63,7 +69,7 @@ tasks.withType(KotlinCompile).configureEach{
// publish
mavenPublishing {
def artifactId = "mvb-android"
def version = "1.0.5"
def version = "1.0.6"
def isSnapshot = false

if (isSnapshot) version += "-SNAPSHOT"
Expand Down
18 changes: 18 additions & 0 deletions api/src/androidTest/java/pers/shawxingkwok/mvb/ConvertToActual.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package pers.shawxingkwok.mvb

import android.os.Parcelable
import kotlinx.parcelize.Parcelize
import org.junit.Test
import pers.shawxingkwok.mvb.android.convertToActual

internal class ConvertToActual {
@Parcelize
class P : Parcelable

@Test
fun start(){
val arr = arrayOf<Parcelable>()
val newArr = arr.convertToActual(P::class.java)
assert(newArr.javaClass.componentType == P::class.java)
}
}
Loading

0 comments on commit b4bb787

Please sign in to comment.