Skip to content

Commit

Permalink
Merge pull request #267 from jschmid/proguard
Browse files Browse the repository at this point in the history
Added warning about ProGuard
  • Loading branch information
Arnaud Giuliani authored Oct 24, 2018
2 parents 88b9134 + 91cf8ac commit cc97a2e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion koin-projects/koin-core/src/docs/asciidoc/dsl.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -479,4 +479,8 @@ val myModule = module {
// declare Controller as single instance, resolving View instance with get()
single<Controller> { create<ControllerImpl>() }
}
----
----

===== Using ProGuard/R8 with create()

When using ProGuard or R8, non-used classes and methods are removed. If you never use the constructor of a class other than with `create()`, ProGuard will remove the constructor because it does not see any usage of it. Fix it by either not using `create()` for such cases, or by adapting your ProGuard rules.

0 comments on commit cc97a2e

Please sign in to comment.