Koin: startKoin from java

Created on 30 Jun 2018  路  5Comments  路  Source: InsertKoinIO/koin

My application is java but I want to use Koin in my Kotlin Code.
I have found this PR
https://github.com/InsertKoinIO/koin/pull/25
It states that could be done like
AndroidExtKt.startKoin(this, this, modules, properties);

But how is the modules defined?

question

All 5 comments

don't understand your question :/

Please check master & 1.0.0 branches for more actual code. This PR has been merged some time ago.

My question was how to start Koin from java. Its more a question of Kotlin interop but I think it is fairly common so please consider putting it in the docs.
The solution looks sth like this.
AndroidExtKt.startKoin(this,this ,Arrays.asList(Api_moduleKt.getApiModule(), App_moduleKt.getApp_module()), MapsKt.<String, Object>emptyMap(),new AndroidLogger());

The best is that you wait the koin-java project that will help you on this topic.
Beta will be published in next days.

this lags as hell

Was this page helpful?
0 / 5 - 0 ratings