YOUNG HO CHA (aka ganachoco)

Results 39 comments of YOUNG HO CHA (aka ganachoco)

Here is a sample app for test ``` $ git clone https://github.com/ganadist/VersionCodeDemo $ cd VersionCodeDemo #### robolectric 4.5.1 or 4.6.1 / includeAndroidResources = true / sdk is 30 $ git...

It seems `ShadowPackageParser` should parse with `parseClusterPackage` ( https://cs.android.com/android/platform/superproject/+/master:frameworks/base/core/java/android/content/pm/PackageParser.java;l=1037-1064?q=parsePackage&ss=android) (directory must contain base apk and split(dynamic feature) apk ), But base apk is located on `app/build/intermediates/apk_for_local_test/developDebugUnitTest/apk-for-local-test.ap_` and can be built...

I tried to modify robolectric as https://github.com/robolectric/robolectric/issues/5597#issuecomment-877836058 , also modify to use package directory instead file. https://github.com/ganadist/robolectric/commit/85c7eb3215d84618143c6ea8834534a0d6afa278#diff-16f874a8ce1fd6aa0c4faba55475bad44949ee2087391001f2a2d209a8dab559R47-R56 Also, I copied base.apk and split.apk, manually ``` cp -f app/build/intermediates/apk_for_local_test/developDebugUnitTest/apk-for-local-test.ap_ \ dynamicfeature1/build/intermediates/apk_for_local_test/developDebugUnitTest/base.apk...

@utzcoz Uhhh. I didn't mention the robotics itself, but I did mention the application code. As mentioned in https://github.com/robolectric/robolectric/issues/7456#issuecomment-1191001974, [reflect](https://developer.android.com/reference/java/lang/reflect/package-summary) package is a part of Android platform API. And regardless...

> @ganadist I think it might be different than the real Android environment because of reflection restriction rules. In Android, there are many special rules like blacklist, whitelist, etc. Logically,...

After robolectric releases 4.10, I rebased ths PR again.

This PR is rebased from current master ( ef1c7cc9d ) And checked with `./gradlew :shadows:playservices:check`

This PR is rebased from current master ( 413a6d182 ) And checked with ./gradlew :shadows:playservices:check

This PR is rebased from current master ( 2f55d51f5a ) And checked with ./gradlew :shadows:playservices:check

Possible workaround: Add following line in build.gradle ``` configurations.all { resolutionStrategy.dependencySubstitution { substitute(module("com.google.protobuf:protobuf-lite")) .using(module("com.google.protobuf:protobuf-javalite:3.22.2")) } } ```