Changelog History
Page 2
-
v1.4.9 Changes
September 17, 2020kotlin 1.4.10
-
v1.4.6 Changes
May 16, 2020🛠 Fix bugs with adding scope and tags to bindings
-
v1.4.3 Changes
May 05, 2020🔨 Refactor of kodi core
➕ Added some documentations
helper function for nullable types
a new way to use keys in KodiStorage with tag -
v1.4.2 Changes
April 29, 2020➕ Added code generation for abstract and static classes and functions for BindSingle and BindProvider annotations
Example:
Create an instance with the provider for class reference
interface IAnotherClass interface IMyClass : IAnotherClass
@BindProvider(toClass = IAnotherClass::class) class MyClass() : IMyClass
It is generate
Providingmethod for binding like:
bind<IAnotherClass>(tag = [toTag]) at [atScope] with provider { MyClass() }Binding for singleton object functions also for hight-order functions
object CustomObject { @BindProvider(toClass = IAnotherClass::class) fun providingMethod(input: IMyClass): IAnotherClass { return input } }
It is generate
Providingmethod for binding like:bind<IAnotherClass>(tag = [toTag]) at [atScope] with provider { CustomObject.providingMethod(input = instance<IMyClass>()) }for interfaces and abstract classes it always will generate
instance<T>():@BindProvider(toClass = IMyClass::class) interface IAbstractInterface : IMyClass
bind<IMyClass>(tag = [toTag]) at [atScope] with provider { instance<IAbstractInterface>() }for abstract functions processor always generate instance().
funName()like:interface IAbstractInterface { @BindProvider(toClass = IAnotherClass::class) fun getMyAbstractInstance(input: IAbstractInterface): IMyClass }
bind<IAnotherClass>(tag = [toTag]) at [atScope] with provider { instance<IAbstractInterface>().getMyAbstractInstance( input = instance<IAbstractInterface>() ) }Added new annotation called
WithInstance
Tell the annotation processor to bind field or property with corresponding kodi instance@BindSingle(toClass = IMyClass::class)" class MyClass( @WithInstance( tag = "myAwesomeTag", scope = "MyAwesomeScope", with = "IDefaultClass::class" ) myDefaultValue: IDefaultClass ) : IMyClass
0️⃣ It's generate single binding function with default instance paramater
bind<IMyClass>() with single { MyClass( myDefaultValue = instance<IDefaultClass>( tag = "myAwesomeTag", scope = "MyAwesomeScope" ) ) } -
v1.4.1 Changes
April 28, 2020🚀 Major release with big new functionality. Was added Annotation processor in the new module - kodigen.
🆕 New annotation in the base package -kodi.annotationsBindSingleandBindProviderannotations can be used with classes and static functions only. It generates akodiModulefile that contains all necessary bindings. 0️⃣ 2.IgnoreInstance- ignore some constructor and methods parameters but be you must specify it by defaultWithInstance- tell the processor to get an instance of the parameter with tag or scope
🚀 This is a first release of the annotation processor and it's will be improved later.
- add
maven { url = "https://dl.bintray.com/sphc/KodiGen" }in your project.gradle file in repository section 🔌 2. to use annotation processor need to includekaptplugin:
🔌apply plugin: 'kotlin-kapt'or with GradleDSL -plugin { kotlin("kapt")} - app.gradle dependency block:
kapt("com.rasalexman.kodi:kodigen::x.y.z")
-
v1.4.0
April 27, 2020 -
v1.3.1 Changes
March 29, 2020⚡️ update Kotlin version to 1.3.71
-
v1.3.0 Changes
March 15, 2020🚀 RELEASE 1.3.0
- Kotlin 1.3.70
- ✂ Removed unused and deprecated methods
- ➕ Added full SCOPE support.
- Kotlin Gradle DSL
- ✅ KodiAndroidX module with the latest Kodi version 1.3.0
-
v1.3.0-rc4 Changes
February 05, 2020➕ added
KodiHolder::clearfunction for free instance when unbind -
v1.3.0-rc1 Changes
January 20, 2020🚀 The main feature of this release is Adding a Scoped Functionality
- 🔨 Fully refactor of the core component
- 📦 Changing the core package path to
com.rasalexman.kodi.* - ✂ Remove unused and unnecessary code
- 🔨 Refactor of scope binding
- 🚀 RC1 is a major release candidate with more lighter implementation but keep the same API
- Kotlin Gradle DSL