Changelog History
Page 1
-
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
Providing
method 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
Providing
method 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.annotations
BindSingle
andBindProvider
annotations can be used with classes and static functions only. It generates akodiModule
file 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 includekapt
plugin:
๐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::clear
function 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