From 7a3384c026e0a2087ed6db8768bd3134fb0fe0ab Mon Sep 17 00:00:00 2001 From: Mike Gouline Date: Sat, 8 May 2021 12:08:53 +1000 Subject: [PATCH] Configs and docs for 1.1 release --- CHANGELOG.md | 5 + README.md | 8 +- docs/1.1/kapsule-core/alltypes/index.html | 57 ++++ docs/1.1/kapsule-core/index-outline.html | 251 ++++++++++++++++ docs/1.1/kapsule-core/index.html | 26 ++ .../-delegate/-optional/-init-.html | 15 + .../-delegate/-optional/get-value.html | 15 + .../-delegate/-optional/index.html | 77 +++++ .../-delegate/-optional/set-value.html | 15 + .../-delegate/-required/-init-.html | 15 + .../-delegate/-required/get-value.html | 15 + .../-delegate/-required/index.html | 77 +++++ .../-delegate/-required/set-value.html | 15 + .../net.gouline.kapsule/-delegate/index.html | 93 ++++++ .../-delegate/initialize.html | 18 ++ .../net.gouline.kapsule/-delegate/value.html | 14 + .../-has-modules/index.html | 42 +++ .../-has-modules/modules.html | 15 + .../net.gouline.kapsule/-injects.html | 46 +++ .../net.gouline.kapsule/-kapsule/-init-.html | 17 ++ .../net.gouline.kapsule/-kapsule/index.html | 71 +++++ .../net.gouline.kapsule/-kapsule/inject.html | 18 ++ .../net.gouline.kapsule/-kapsule/invoke.html | 20 ++ .../-kapsule/optional.html | 20 ++ .../-kapsule/required.html | 20 ++ .../net.gouline.kapsule/-kapsules/get.html | 20 ++ .../net.gouline.kapsule/-kapsules/index.html | 28 ++ .../-init-.html | 18 ++ .../index.html | 32 ++ .../net.gouline.kapsule/index.html | 119 ++++++++ .../net.gouline.kapsule/inject.html | 15 + .../net.gouline.kapsule/optional.html | 15 + .../net.gouline.kapsule/required.html | 15 + .../net.gouline.kapsule/transitive.html | 19 ++ docs/1.1/kapsule-core/package-list | 4 + docs/1.1/style.css | 283 ++++++++++++++++++ docs/index.html | 2 +- gradle.properties | 9 +- gradle/publish.gradle | 82 +++-- gradle/wrapper/gradle-wrapper.properties | 2 +- 40 files changed, 1591 insertions(+), 57 deletions(-) create mode 100644 docs/1.1/kapsule-core/alltypes/index.html create mode 100644 docs/1.1/kapsule-core/index-outline.html create mode 100644 docs/1.1/kapsule-core/index.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/-init-.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/get-value.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/index.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/set-value.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/-init-.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/get-value.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/index.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/set-value.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/index.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/initialize.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/value.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-has-modules/index.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-has-modules/modules.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-injects.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/-init-.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/index.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/inject.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/invoke.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/optional.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/required.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-kapsules/get.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-kapsules/index.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-transitive-injection-exception/-init-.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/-transitive-injection-exception/index.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/index.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/inject.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/optional.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/required.html create mode 100644 docs/1.1/kapsule-core/net.gouline.kapsule/transitive.html create mode 100644 docs/1.1/kapsule-core/package-list create mode 100644 docs/1.1/style.css diff --git a/CHANGELOG.md b/CHANGELOG.md index 4546148..3e44ad5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Change Log +## Version 1.1 (2021-05-08) + +* Change package prefix from `space.traversal` to `net.gouline` after repository migration. +* Remove Bintray publishing process. + ## Version 1.0 (2019-05-30) * Update dependency versions. diff --git a/README.md b/README.md index a9b16dd..0f4b1e0 100644 --- a/README.md +++ b/README.md @@ -43,18 +43,20 @@ To accomplish all of these, Kapsule is based on [delegation](http://kotlinlang.o To use Kapsule in your project, include it as a dependency. #### Using Gradle: + ~~~gradle dependencies { - compile "space.traversal.kapsule:kapsule-core:1.0" + compile "net.gouline.kapsule:kapsule-core:1.1" } ~~~ #### Or Maven: + ~~~xml - space.traversal.kapsule + net.gouline.kapsule kapsule-core - 1.0 + 1.1 ~~~ diff --git a/docs/1.1/kapsule-core/alltypes/index.html b/docs/1.1/kapsule-core/alltypes/index.html new file mode 100644 index 0000000..de13603 --- /dev/null +++ b/docs/1.1/kapsule-core/alltypes/index.html @@ -0,0 +1,57 @@ + + + +alltypes - kapsule-core + + + +

All Types

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+net.gouline.kapsule.Delegate +

Kapsule property delegate.

+
+net.gouline.kapsule.HasModules +

Module with other submodules attached via delegation.

+
+net.gouline.kapsule.Injects +

Injection interface.

+
+net.gouline.kapsule.Kapsule +

Kapsule injector.

+
+net.gouline.kapsule.Kapsules +

Static storage of Kapsule instances.

+
+net.gouline.kapsule.TransitiveInjectionException +

Class cast exception indicating that a submodule depends on a module that +is not a descendant of the root module.

+
+ + diff --git a/docs/1.1/kapsule-core/index-outline.html b/docs/1.1/kapsule-core/index-outline.html new file mode 100644 index 0000000..4f67c74 --- /dev/null +++ b/docs/1.1/kapsule-core/index-outline.html @@ -0,0 +1,251 @@ + + + +Module Contents + + + +kapsule-core
+ + + diff --git a/docs/1.1/kapsule-core/index.html b/docs/1.1/kapsule-core/index.html new file mode 100644 index 0000000..8818be7 --- /dev/null +++ b/docs/1.1/kapsule-core/index.html @@ -0,0 +1,26 @@ + + + +kapsule-core + + + +kapsule-core
+
+

Packages

+ + + + + + + +
+

net.gouline.kapsule

+
+

Kapsule API

+
+

Index

+All Types + + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/-init-.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/-init-.html new file mode 100644 index 0000000..46b2cd3 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/-init-.html @@ -0,0 +1,15 @@ + + + +Delegate.Optional.<init> - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Delegate / Optional / <init>
+
+

<init>

+ +Optional(initializer: M.() -> T?) +

Delegate for optional (nullable) values.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/get-value.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/get-value.html new file mode 100644 index 0000000..dc30d3b --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/get-value.html @@ -0,0 +1,15 @@ + + + +Delegate.Optional.getValue - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Delegate / Optional / getValue
+
+

getValue

+ +operator fun getValue(thisRef: Any?, property: KProperty<*>): T? +

Delegate for value reads.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/index.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/index.html new file mode 100644 index 0000000..badacf6 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/index.html @@ -0,0 +1,77 @@ + + + +Delegate.Optional - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Delegate / Optional
+
+

Optional

+class Optional<in M, T> : Delegate<M, T> +

Delegate for optional (nullable) values.

+

Constructors

+ + + + + + + +
+

<init>

+
+Optional(initializer: M.() -> T?) +

Delegate for optional (nullable) values.

+
+

Inherited Properties

+ + + + + + + +
+

value

+
+var value: T?
+

Functions

+ + + + + + + + + + + +
+

getValue

+
+operator fun getValue(thisRef: Any?, property: KProperty<*>): T? +

Delegate for value reads.

+
+

setValue

+
+operator fun setValue(thisRef: Any?, property: KProperty<*>, t: T?): Unit +

Delegate for value writes.

+
+

Inherited Functions

+ + + + + + + +
+

initialize

+
+fun initialize(module: M): Unit +

Initializes value from the injection module.

+
+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/set-value.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/set-value.html new file mode 100644 index 0000000..4ef450e --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-optional/set-value.html @@ -0,0 +1,15 @@ + + + +Delegate.Optional.setValue - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Delegate / Optional / setValue
+
+

setValue

+ +operator fun setValue(thisRef: Any?, property: KProperty<*>, t: T?): Unit +

Delegate for value writes.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/-init-.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/-init-.html new file mode 100644 index 0000000..0cf54d0 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/-init-.html @@ -0,0 +1,15 @@ + + + +Delegate.Required.<init> - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Delegate / Required / <init>
+
+

<init>

+ +Required(initializer: M.() -> T) +

Delegate for required (non-null) values.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/get-value.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/get-value.html new file mode 100644 index 0000000..bbb0653 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/get-value.html @@ -0,0 +1,15 @@ + + + +Delegate.Required.getValue - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Delegate / Required / getValue
+
+

getValue

+ +operator fun getValue(thisRef: Any?, property: KProperty<*>): T +

Delegate for value reads.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/index.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/index.html new file mode 100644 index 0000000..45ffb77 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/index.html @@ -0,0 +1,77 @@ + + + +Delegate.Required - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Delegate / Required
+
+

Required

+class Required<in M, T> : Delegate<M, T> +

Delegate for required (non-null) values.

+

Constructors

+ + + + + + + +
+

<init>

+
+Required(initializer: M.() -> T) +

Delegate for required (non-null) values.

+
+

Inherited Properties

+ + + + + + + +
+

value

+
+var value: T?
+

Functions

+ + + + + + + + + + + +
+

getValue

+
+operator fun getValue(thisRef: Any?, property: KProperty<*>): T +

Delegate for value reads.

+
+

setValue

+
+operator fun setValue(thisRef: Any?, property: KProperty<*>, t: T): Unit +

Delegate for value writes.

+
+

Inherited Functions

+ + + + + + + +
+

initialize

+
+fun initialize(module: M): Unit +

Initializes value from the injection module.

+
+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/set-value.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/set-value.html new file mode 100644 index 0000000..b630553 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/-required/set-value.html @@ -0,0 +1,15 @@ + + + +Delegate.Required.setValue - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Delegate / Required / setValue
+
+

setValue

+ +operator fun setValue(thisRef: Any?, property: KProperty<*>, t: T): Unit +

Delegate for value writes.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/index.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/index.html new file mode 100644 index 0000000..31107be --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/index.html @@ -0,0 +1,93 @@ + + + +Delegate - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Delegate
+
+

Delegate

+sealed class Delegate<in M, T> +

Kapsule property delegate.

+

Parameters

+

+initializer - Value initializer function.

+

Parameters
+

+

Parameters
+

+

Types

+ + + + + + + + + + + +
+

Optional

+
+class Optional<in M, T> : Delegate<M, T> +

Delegate for optional (nullable) values.

+
+

Required

+
+class Required<in M, T> : Delegate<M, T> +

Delegate for required (non-null) values.

+
+

Properties

+ + + + + + + +
+

value

+
+var value: T?
+

Functions

+ + + + + + + +
+

initialize

+
+fun initialize(module: M): Unit +

Initializes value from the injection module.

+
+

Inheritors

+ + + + + + + + + + + +
+

Optional

+
+class Optional<in M, T> : Delegate<M, T> +

Delegate for optional (nullable) values.

+
+

Required

+
+class Required<in M, T> : Delegate<M, T> +

Delegate for required (non-null) values.

+
+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/initialize.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/initialize.html new file mode 100644 index 0000000..db4a2d4 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/initialize.html @@ -0,0 +1,18 @@ + + + +Delegate.initialize - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Delegate / initialize
+
+

initialize

+ +fun initialize(module: M): Unit +

Initializes value from the injection module.

+

Parameters

+

+module - Injection module containing provider.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/value.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/value.html new file mode 100644 index 0000000..e9459dc --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-delegate/value.html @@ -0,0 +1,14 @@ + + + +Delegate.value - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Delegate / value
+
+

value

+ +var value: T? + + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-has-modules/index.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-has-modules/index.html new file mode 100644 index 0000000..adf652f --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-has-modules/index.html @@ -0,0 +1,42 @@ + + + +HasModules - kapsule-core + + + +kapsule-core / net.gouline.kapsule / HasModules
+
+

HasModules

+interface HasModules +

Module with other submodules attached via delegation.

+

Properties

+ + + + + + + +
+

modules

+
+abstract val modules: Set<Any> +

Set of child modules. Used for transitive injection.

+
+

Extension Functions

+ + + + + + + +
+

transitive

+
+fun <M : HasModules> M.transitive(): M +

Injects root module into any submodules with transitive dependencies.

+
+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-has-modules/modules.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-has-modules/modules.html new file mode 100644 index 0000000..a7bec9a --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-has-modules/modules.html @@ -0,0 +1,15 @@ + + + +HasModules.modules - kapsule-core + + + +kapsule-core / net.gouline.kapsule / HasModules / modules
+
+

modules

+ +abstract val modules: Set<Any> +

Set of child modules. Used for transitive injection.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-injects.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-injects.html new file mode 100644 index 0000000..13294f6 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-injects.html @@ -0,0 +1,46 @@ + + + +Injects - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Injects
+
+

Injects

+interface Injects<M> +

Injection interface.

+

Extension Functions

+ + + + + + + + + + + + + + + +
+

inject

+
+fun <M> Injects<M>.inject(module: M): Unit +

Fetches Kapsule instance and calls Kapsule.inject.

+
+

optional

+
+fun <M, T> Injects<M>.optional(initializer: M.() -> T?): Delegate.Optional<M, T> +

Fetches Kapsule instance and calls Kapsule.optional.

+
+

required

+
+fun <M, T> Injects<M>.required(initializer: M.() -> T): Delegate.Required<M, T> +

Fetches Kapsule instance and calls Kapsule.required.

+
+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/-init-.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/-init-.html new file mode 100644 index 0000000..216188b --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/-init-.html @@ -0,0 +1,17 @@ + + + +Kapsule.<init> - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Kapsule / <init>
+
+

<init>

+ +Kapsule() +

Kapsule injector.

+

Parameters
+

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/index.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/index.html new file mode 100644 index 0000000..abdcc35 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/index.html @@ -0,0 +1,71 @@ + + + +Kapsule - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Kapsule
+
+

Kapsule

+class Kapsule<M> +

Kapsule injector.

+

Parameters
+

+

Constructors

+ + + + + + + +
+

<init>

+
+Kapsule() +

Kapsule injector.

+
+

Functions

+ + + + + + + + + + + + + + + + + + + +
+

inject

+
+fun inject(module: M): Unit +

Initializes property delegates with provided functions.

+
+

invoke

+
+operator fun <T> invoke(initializer: M.() -> T): Delegate.Required<M, T> +

Shortcut for required by invoking the class like a function.

+
+

optional

+
+fun <T> optional(initializer: M.() -> T?): Delegate.Optional<M, T> +

Creates and registers delegate for an optional (nullable) injectable property.

+
+

required

+
+fun <T> required(initializer: M.() -> T): Delegate.Required<M, T> +

Creates and registers delegate for a required (non-null) injectable property.

+
+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/inject.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/inject.html new file mode 100644 index 0000000..8143018 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/inject.html @@ -0,0 +1,18 @@ + + + +Kapsule.inject - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Kapsule / inject
+
+

inject

+ +@Synchronized fun inject(module: M): Unit +

Initializes property delegates with provided functions.

+

Parameters

+

+module - Injection module containing providers.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/invoke.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/invoke.html new file mode 100644 index 0000000..949daf1 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/invoke.html @@ -0,0 +1,20 @@ + + + +Kapsule.invoke - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Kapsule / invoke
+
+

invoke

+ +operator fun <T> invoke(initializer: M.() -> T): Delegate.Required<M, T> +

Shortcut for required by invoking the class like a function.

+

Parameters

+

+initializer - Initializer function from the module context to value.

+

Return
+Required (non-null) property delegate.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/optional.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/optional.html new file mode 100644 index 0000000..273878d --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/optional.html @@ -0,0 +1,20 @@ + + + +Kapsule.optional - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Kapsule / optional
+
+

optional

+ +fun <T> optional(initializer: M.() -> T?): Delegate.Optional<M, T> +

Creates and registers delegate for an optional (nullable) injectable property.

+

Parameters

+

+initializer - Initializer function from the module context to value.

+

Return
+Optional (nullable) property delegate.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/required.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/required.html new file mode 100644 index 0000000..8c34070 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsule/required.html @@ -0,0 +1,20 @@ + + + +Kapsule.required - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Kapsule / required
+
+

required

+ +fun <T> required(initializer: M.() -> T): Delegate.Required<M, T> +

Creates and registers delegate for a required (non-null) injectable property.

+

Parameters

+

+initializer - Initializer function from the module context to value.

+

Return
+Required (non-null) property delegate.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsules/get.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsules/get.html new file mode 100644 index 0000000..74d27b8 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsules/get.html @@ -0,0 +1,20 @@ + + + +Kapsules.get - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Kapsules / get
+
+

get

+ +fun <M> get(caller: Injects<M>): Kapsule<M> +

Retrieves active instance of Kapsule or creates a new one.

+

Parameters

+

+caller - Injection caller instance, used as lookup key.

+

Return
+Stored or new instance.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsules/index.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsules/index.html new file mode 100644 index 0000000..ddd094d --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-kapsules/index.html @@ -0,0 +1,28 @@ + + + +Kapsules - kapsule-core + + + +kapsule-core / net.gouline.kapsule / Kapsules
+
+

Kapsules

+object Kapsules +

Static storage of Kapsule instances.

+

Functions

+ + + + + + + +
+

get

+
+fun <M> get(caller: Injects<M>): Kapsule<M> +

Retrieves active instance of Kapsule or creates a new one.

+
+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-transitive-injection-exception/-init-.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-transitive-injection-exception/-init-.html new file mode 100644 index 0000000..a5a11c3 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-transitive-injection-exception/-init-.html @@ -0,0 +1,18 @@ + + + +TransitiveInjectionException.<init> - kapsule-core + + + +kapsule-core / net.gouline.kapsule / TransitiveInjectionException / <init>
+
+

<init>

+ +TransitiveInjectionException(clazz: Class<*>) +

Class cast exception indicating that a submodule depends on a module that +is not a descendant of the root module.

+

Parameters
+

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/-transitive-injection-exception/index.html b/docs/1.1/kapsule-core/net.gouline.kapsule/-transitive-injection-exception/index.html new file mode 100644 index 0000000..b005f37 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/-transitive-injection-exception/index.html @@ -0,0 +1,32 @@ + + + +TransitiveInjectionException - kapsule-core + + + +kapsule-core / net.gouline.kapsule / TransitiveInjectionException
+
+

TransitiveInjectionException

+class TransitiveInjectionException : ClassCastException +

Class cast exception indicating that a submodule depends on a module that +is not a descendant of the root module.

+

Parameters
+

+

Constructors

+ + + + + + + +
+

<init>

+
+TransitiveInjectionException(clazz: Class<*>) +

Class cast exception indicating that a submodule depends on a module that +is not a descendant of the root module.

+
+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/index.html b/docs/1.1/kapsule-core/net.gouline.kapsule/index.html new file mode 100644 index 0000000..fbe9771 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/index.html @@ -0,0 +1,119 @@ + + + +net.gouline.kapsule - kapsule-core + + + +kapsule-core / net.gouline.kapsule
+
+

Package net.gouline.kapsule

+

Kapsule API

+

Types

+ + + + + + + + + + + + + + + + + + + + + + + +
+

Delegate

+
+sealed class Delegate<in M, T> +

Kapsule property delegate.

+
+

HasModules

+
+interface HasModules +

Module with other submodules attached via delegation.

+
+

Injects

+
+interface Injects<M> +

Injection interface.

+
+

Kapsule

+
+class Kapsule<M> +

Kapsule injector.

+
+

Kapsules

+
+object Kapsules +

Static storage of Kapsule instances.

+
+

Exceptions

+ + + + + + + +
+

TransitiveInjectionException

+
+class TransitiveInjectionException : ClassCastException +

Class cast exception indicating that a submodule depends on a module that +is not a descendant of the root module.

+
+

Functions

+ + + + + + + + + + + + + + + + + + + +
+

inject

+
+fun <M> Injects<M>.inject(module: M): Unit +

Fetches Kapsule instance and calls Kapsule.inject.

+
+

optional

+
+fun <M, T> Injects<M>.optional(initializer: M.() -> T?): Delegate.Optional<M, T> +

Fetches Kapsule instance and calls Kapsule.optional.

+
+

required

+
+fun <M, T> Injects<M>.required(initializer: M.() -> T): Delegate.Required<M, T> +

Fetches Kapsule instance and calls Kapsule.required.

+
+

transitive

+
+fun <M : HasModules> M.transitive(): M +

Injects root module into any submodules with transitive dependencies.

+
+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/inject.html b/docs/1.1/kapsule-core/net.gouline.kapsule/inject.html new file mode 100644 index 0000000..6048516 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/inject.html @@ -0,0 +1,15 @@ + + + +inject - kapsule-core + + + +kapsule-core / net.gouline.kapsule / inject
+
+

inject

+ +fun <M> Injects<M>.inject(module: M): Unit +

Fetches Kapsule instance and calls Kapsule.inject.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/optional.html b/docs/1.1/kapsule-core/net.gouline.kapsule/optional.html new file mode 100644 index 0000000..a2daba5 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/optional.html @@ -0,0 +1,15 @@ + + + +optional - kapsule-core + + + +kapsule-core / net.gouline.kapsule / optional
+
+

optional

+ +fun <M, T> Injects<M>.optional(initializer: M.() -> T?): Delegate.Optional<M, T> +

Fetches Kapsule instance and calls Kapsule.optional.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/required.html b/docs/1.1/kapsule-core/net.gouline.kapsule/required.html new file mode 100644 index 0000000..afa748f --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/required.html @@ -0,0 +1,15 @@ + + + +required - kapsule-core + + + +kapsule-core / net.gouline.kapsule / required
+
+

required

+ +fun <M, T> Injects<M>.required(initializer: M.() -> T): Delegate.Required<M, T> +

Fetches Kapsule instance and calls Kapsule.required.

+ + diff --git a/docs/1.1/kapsule-core/net.gouline.kapsule/transitive.html b/docs/1.1/kapsule-core/net.gouline.kapsule/transitive.html new file mode 100644 index 0000000..c7bee76 --- /dev/null +++ b/docs/1.1/kapsule-core/net.gouline.kapsule/transitive.html @@ -0,0 +1,19 @@ + + + +transitive - kapsule-core + + + +kapsule-core / net.gouline.kapsule / transitive
+
+

transitive

+ +fun <M : HasModules> M.transitive(): M +

Injects root module into any submodules with transitive dependencies.

+

Return
+Root module for chaining.

+

Parameters
+

+ + diff --git a/docs/1.1/kapsule-core/package-list b/docs/1.1/kapsule-core/package-list new file mode 100644 index 0000000..77e953d --- /dev/null +++ b/docs/1.1/kapsule-core/package-list @@ -0,0 +1,4 @@ +$dokka.format:html +$dokka.linkExtension:html + +net.gouline.kapsule diff --git a/docs/1.1/style.css b/docs/1.1/style.css new file mode 100644 index 0000000..914be69 --- /dev/null +++ b/docs/1.1/style.css @@ -0,0 +1,283 @@ +@import url(https://fonts.googleapis.com/css?family=Open+Sans:300i,400,700); + +body, table { + padding:50px; + font:14px/1.5 'Open Sans', "Helvetica Neue", Helvetica, Arial, sans-serif; + color:#555; + font-weight:300; + margin-left: auto; + margin-right: auto; + max-width: 1440px; +} + +.keyword { + color:black; + font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; + font-size:12px; +} + +.symbol { + font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; + font-size:12px; +} + +.identifier { + color: darkblue; + font-size:12px; + font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; +} + +h1, h2, h3, h4, h5, h6 { + color:#222; + margin:0 0 20px; +} + +p, ul, ol, table, pre, dl { + margin:0 0 20px; +} + +h1, h2, h3 { + line-height:1.1; +} + +h1 { + font-size:28px; +} + +h2 { + color:#393939; +} + +h3, h4, h5, h6 { + color:#494949; +} + +a { + color:#258aaf; + font-weight:400; + text-decoration:none; +} + +a:hover { + color: inherit; + text-decoration:underline; +} + +a small { + font-size:11px; + color:#555; + margin-top:-0.6em; + display:block; +} + +.wrapper { + width:860px; + margin:0 auto; +} + +blockquote { + border-left:1px solid #e5e5e5; + margin:0; + padding:0 0 0 20px; + font-style:italic; +} + +code, pre { + font-family:Monaco, Bitstream Vera Sans Mono, Lucida Console, Terminal; + color:#333; + font-size:12px; +} + +pre { + display: block; +/* + padding:8px 8px; + background: #f8f8f8; + border-radius:5px; + border:1px solid #e5e5e5; +*/ + overflow-x: auto; +} + +table { + width:100%; + border-collapse:collapse; +} + +th, td { + text-align:left; + vertical-align: top; + padding:5px 10px; +} + +dt { + color:#444; + font-weight:700; +} + +th { + color:#444; +} + +img { + max-width:100%; +} + +header { + width:270px; + float:left; + position:fixed; +} + +header ul { + list-style:none; + height:40px; + + padding:0; + + background: #eee; + background: -moz-linear-gradient(top, #f8f8f8 0%, #dddddd 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd)); + background: -webkit-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); + background: -o-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); + background: -ms-linear-gradient(top, #f8f8f8 0%,#dddddd 100%); + background: linear-gradient(top, #f8f8f8 0%,#dddddd 100%); + + border-radius:5px; + border:1px solid #d2d2d2; + box-shadow:inset #fff 0 1px 0, inset rgba(0,0,0,0.03) 0 -1px 0; + width:270px; +} + +header li { + width:89px; + float:left; + border-right:1px solid #d2d2d2; + height:40px; +} + +header ul a { + line-height:1; + font-size:11px; + color:#999; + display:block; + text-align:center; + padding-top:6px; + height:40px; +} + +strong { + color:#222; + font-weight:700; +} + +header ul li + li { + width:88px; + border-left:1px solid #fff; +} + +header ul li + li + li { + border-right:none; + width:89px; +} + +header ul a strong { + font-size:14px; + display:block; + color:#222; +} + +section { + width:500px; + float:right; + padding-bottom:50px; +} + +small { + font-size:11px; +} + +hr { + border:0; + background:#e5e5e5; + height:1px; + margin:0 0 20px; +} + +footer { + width:270px; + float:left; + position:fixed; + bottom:50px; +} + +@media print, screen and (max-width: 960px) { + + div.wrapper { + width:auto; + margin:0; + } + + header, section, footer { + float:none; + position:static; + width:auto; + } + + header { + padding-right:320px; + } + + section { + border:1px solid #e5e5e5; + border-width:1px 0; + padding:20px 0; + margin:0 0 20px; + } + + header a small { + display:inline; + } + + header ul { + position:absolute; + right:50px; + top:52px; + } +} + +@media print, screen and (max-width: 720px) { + body { + word-wrap:break-word; + } + + header { + padding:0; + } + + header ul, header p.view { + position:static; + } + + pre, code { + word-wrap:normal; + } +} + +@media print, screen and (max-width: 480px) { + body { + padding:15px; + } + + header ul { + display:none; + } +} + +@media print { + body { + padding:0.4in; + font-size:12pt; + color:#444; + } +} diff --git a/docs/index.html b/docs/index.html index f958a89..9a66dc7 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,6 +1,6 @@ - + diff --git a/gradle.properties b/gradle.properties index 190d853..496517b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ publish.groupId=net.gouline.kapsule publish.version=0.1-SNAPSHOT publish.name=Kapsule publish.description=Minimalist dependency injection library for Kotlin -publish.url=https://gouline.net/kapsule +publish.url=https://github.com/gouline/kapsule # VCS publish.vcsHttp=https://github.com/gouline/kapsule.git @@ -12,13 +12,8 @@ publish.vcsUrl=https://github.com/gouline/kapsule # Licence publish.license.name=MIT -publish.license.url=http://opensource.org/licenses/MIT +publish.license.url=https://opensource.org/licenses/MIT # Developer publish.developer.id=gouline publish.developer.name=Mike Gouline - -# Bintray -bintray.package=kapsule -bintray.repo=maven -bintray.userOrg=gouline diff --git a/gradle/publish.gradle b/gradle/publish.gradle index 36b3aa7..42e9d51 100644 --- a/gradle/publish.gradle +++ b/gradle/publish.gradle @@ -1,5 +1,5 @@ apply plugin: 'maven-publish' -apply plugin: 'com.jfrog.bintray' +apply plugin: 'signing' apply plugin: 'org.jetbrains.dokka' ext { @@ -52,56 +52,48 @@ def pomConfig = { } } -publishing { - publications { - mavenJava(MavenPublication) { - from components.java - artifact sourcesJar - artifact javadocJar - groupId project['publish.groupId'] - artifactId project['publish.artifactId'] - version project['publish.version'] - pom.withXml { - def root = asNode() - root.appendNode('name', project['publish.name']) - root.appendNode('description', project['publish.description']) - root.appendNode('url', project['publish.url']) - root.children().last() + pomConfig +if (hasProperty('ossrhUsername') && hasProperty('ossrhPassword')) { + publishing { + publications { + mavenJava(MavenPublication) { + from components.java + artifact sourcesJar + artifact javadocJar + groupId project['publish.groupId'] + artifactId project['publish.artifactId'] + version project['publish.version'] + pom.withXml { + def root = asNode() + root.appendNode('name', project['publish.name']) + root.appendNode('description', project['publish.description']) + root.appendNode('url', project['publish.url']) + root.children().last() + pomConfig + } } } - } -} -if (hasProperty('bintray.user') && hasProperty('bintray.key') && - hasProperty('ossrh.username') && hasProperty('ossrh.password')) { - bintray { - user = project['bintray.user'] - key = project['bintray.key'] - publications = ['mavenJava'] + repositories { + maven { + def releasesRepoUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' + def snapshotsRepoUrl = 'https://oss.sonatype.org/content/repositories/snapshots/' + url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl - dryRun = false - publish = true - - pkg { - name = project['bintray.package'] - repo = project['bintray.repo'] - userOrg = project['bintray.userOrg'] - desc = project['publish.description'] - licenses = [project['publish.license.name']] - websiteUrl = project['publish.url'] - vcsUrl = project['publish.vcsHttp'] - version { - released = new Date() - name = project['publish.version'] - vcsTag = "v${project['publish.version']}" - gpg { - sign = true - } - mavenCentralSync { - user = project['ossrh.username'] - password = project['ossrh.password'] + credentials { + username project['ossrhUsername'] + password project['ossrhPassword'] } } } } + + signing { + sign publishing.publications.mavenJava + } + + publish.dependsOn { + if (!rootProject.hasProperty('ossrhUsername') || !rootProject.hasProperty('ossrhPassword')) { + throw new IllegalArgumentException("Properties 'ossrhUsername' and 'ossrhPassword'" + + " must be defined to access the Sonatype repository!") + } + } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 500f295..a475c59 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.9-all.zip