Skip to content

Commit

Permalink
Add deep versions
Browse files Browse the repository at this point in the history
  • Loading branch information
IRus committed Jan 11, 2021
1 parent a01bcd3 commit 1b3c23c
Show file tree
Hide file tree
Showing 140 changed files with 5,559 additions and 16 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ find . -name '*.tar' |xargs ls -lh |grep -v original |grep -v common
# 2 classes
time (for i in {1..10}; do ./baseline/build/install/baseline/bin/baseline; done)
time (for i in {1..10}; do ./bootique2/build/install/bootique2/bin/bootique2; done)
time (for i in {1..10}; do ./bootique/build/install/bootique/bin/bootique; done)
time (for i in {1..10}; do ./cayennedi/build/install/cayennedi/bin/cayennedi; done)
time (for i in {1..10}; do ./dagger/build/install/dagger/bin/dagger; done)
time (for i in {1..10}; do ./guice/build/install/guice/bin/guice; done)
Expand All @@ -39,7 +39,7 @@ time (for i in {1..10}; do ./kodein/build/install/kodein/bin/kodein; done)
# 100 classes
time (for i in {1..10}; do ./baseline-deep/build/install/baseline-deep/bin/baseline-deep; done)
time (for i in {1..10}; do ./bootique2-deep/build/install/bootique2-deep/bin/bootique2-deep; done)
time (for i in {1..10}; do ./bootique-deep/build/install/bootique-deep/bin/bootique-deep; done)
time (for i in {1..10}; do ./cayennedi-deep/build/install/cayennedi-deep/bin/cayennedi-deep; done)
time (for i in {1..10}; do ./dagger-deep/build/install/dagger-deep/bin/dagger-deep; done)
time (for i in {1..10}; do ./guice-deep/build/install/guice-deep/bin/guice-deep; done)
Expand All @@ -55,7 +55,7 @@ time (for i in {1..10}; do ./kodein-deep/build/install/kodein-deep/bin/kodein-de
# Lines of code for 2 classes
cloc ./baseline/src
cloc ./bootique2/src
cloc ./bootique/src
cloc ./cayennedi/src
cloc ./dagger/src/main/java
cloc ./guice/src
Expand All @@ -69,7 +69,7 @@ cloc ./kodein/src
# Lines of code for 100 classes
cloc ./baseline-deep/src
cloc ./bootique2-deep/src
cloc ./bootique-deep/src
cloc ./cayennedi-deep/src
cloc ./dagger-deep/src/main/java
cloc ./guice-deep/src
Expand All @@ -91,7 +91,7 @@ cloc ./kodein-deep/src
|Koin|1.8|2.56|16|
|Kodein|2.4|2.93|17|
|Bootique|4.2|4.31|52|
|Guice|5.4|6.22|33|
|Guice|5.3|6.51|33|
|Komodo|6.4|7.56|17|
|Spring|5.5|8.36|23|
|OpenWebBeans|3.0|10.02|35|
Expand All @@ -102,12 +102,12 @@ cloc ./kodein-deep/src
|----|----|----|----|
|Baseline|1.8|2.28|107|
|Dagger|2.0|2.70|534|
|Cayenne DI||||
|Koin||||
|Kodein||||
|Bootique||||
|Guice||||
|Komodo||||
|Spring||||
|OpenWebBeans||||
|Spring Boot||||
|Cayenne DI|2.0|3.70|1444|
|Koin|2.1|3.92|113|
|Kodein|2.9|5.58|114|
|Bootique|4.3|5.79|549|
|Guice|5.4|8.70|530|
|Spring|5.5|12.81|420|
|Komodo|6.6|12.87|114|
|OpenWebBeans|3.2|16.16|532|
|Spring Boot|9.4|30.42|439|
21 changes: 21 additions & 0 deletions bootique-deep/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
plugins {
java
application
}

application {
mainClass.set("org.objectstyle.bootique2.Main")
}

repositories {
jcenter()
maven {
url = uri("https://maven.objectstyle.org/nexus/content/repositories/bootique-snapshots/")
}
}

dependencies {
implementation(project(":common-deep"))

implementation("io.bootique:bootique:2.0-SNAPSHOT")
}
10 changes: 10 additions & 0 deletions bootique-deep/src/main/java/org/objectstyle/bootique2/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.objectstyle.bootique2;

import io.bootique.Bootique;

public class Main {

public static void main(String[] args) {
Bootique.app(args).autoLoadModules().exec().exit();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package org.objectstyle.bootique2;

import io.bootique.cli.Cli;
import io.bootique.command.Command;
import io.bootique.command.CommandOutcome;
import io.heapy.sample.common2.Service;

import javax.inject.Inject;
import javax.inject.Provider;

public class MainCommand implements Command {

private Provider<Service> serviceProvider;

@Inject
public MainCommand(Provider<Service> serviceProvider) {
this.serviceProvider = serviceProvider;
}

@Override
public CommandOutcome run(Cli cli) {
System.out.println(serviceProvider.get().name());
return CommandOutcome.succeeded();
}
}
Loading

0 comments on commit 1b3c23c

Please sign in to comment.