keeper: PrintUses assertion failure on methods returning inline classes

Keeper version: 0.7.0

Steps to reproduce:

  1. Create a new application with Android Studio’s wizard;
  2. Add and configure keeper plugin;
  3. Add the following dependency to your Gradle script androidTestImplementation "org.koin:koin-test:2.1.6";

Expected result:

The tests should run without issues.

Actual result:

The compilation fails at inferReleaseAndroidTestKeepRulesForKeeper task. This is the error message given by the failed task:

Execution failed for task ':app:inferReleaseAndroidTestKeepRulesForKeeper'.
> Process 'command '/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

And this is the exception from the task:

Exception in thread "main" java.lang.AssertionError
	at com.android.tools.r8.PrintUses$UseCollector.addMethod(PrintUses.java:211)
	at com.android.tools.r8.PrintUses$UseCollector.registerInvokeVirtual(PrintUses.java:90)
	at com.android.tools.r8.cf.code.CfInvoke.registerUse(CfInvoke.java:89)
	at com.android.tools.r8.graph.CfCode.registerCodeReferences(CfCode.java:376)
	at com.android.tools.r8.graph.LazyCfCode.registerCodeReferences(LazyCfCode.java:204)
	at com.android.tools.r8.graph.DexEncodedMethod.registerCodeReferences(DexEncodedMethod.java:1070)
	at com.android.tools.r8.PrintUses$UseCollector.registerMethod(PrintUses.java:240)
	at com.android.tools.r8.PrintUses$UseCollector.access$1200(PrintUses.java:77)
	at com.android.tools.r8.PrintUses.lambda$analyze$0(PrintUses.java:340)
	at com.android.tools.r8.graph.DexClass.forEachMethod(DexClass.java:294)
	at com.android.tools.r8.PrintUses.analyze(PrintUses.java:340)
	at com.android.tools.r8.PrintUses.main(PrintUses.java:309)

Note:

As a side note if I remove the dependency it stills fails, to restore the functioning status I have first to clean the project.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21 (2 by maintainers)

Most upvoted comments

Yeah that’s a generic error point, I don’t think your issue is related and likely needs to be filed on the R8 issue tracker as your attribute issues don’t seem related to keeper