-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This changeset adds basic initial support for Micronaut, with new rule macros which inject dependencies, and support for a basic testbed which works. Changes so far: - [x] Add Micronaut dependencies - [x] Add rule macros for Micronaut libs/apps/etc. - [x] Add a little testbed which executes controllers - [x] Add tests for Kotlin and Java - [x] Invoke Micronaut from a browser test - [x] From Java - [x] From Kotlin (this required a patch at bazelbuild/rules_webtesting#409) - [x] Ability to opt-out of Micronaut dependencies
- Loading branch information
Showing
25 changed files
with
2,596 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
load( | ||
"//defs/toolchain/java:rules.bzl", | ||
_jdk_binary = "jdk_binary", | ||
_jdk_library = "jdk_library", | ||
_micronaut_library = "micronaut_library", | ||
_micronaut_application = "micronaut_application", | ||
) | ||
|
||
load( | ||
"//defs/toolchain/java:testing.bzl", | ||
_jdk_test = "jdk_test", | ||
_micronaut_test = "micronaut_test", | ||
) | ||
|
||
|
||
jdk_test = _jdk_test | ||
jdk_binary = _jdk_binary | ||
jdk_library = _jdk_library | ||
micronaut_test = _micronaut_test | ||
micronaut_library = _micronaut_library | ||
micronaut_application = _micronaut_application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
package( | ||
default_visibility = ["//visibility:public"], | ||
) | ||
|
||
load( | ||
"@rules_java//java:defs.bzl", | ||
"java_plugin", | ||
"java_library", | ||
) | ||
|
||
load( | ||
"//defs/toolchain:deps.bzl", | ||
"maven", | ||
) | ||
|
||
|
||
java_library( | ||
name = "micronaut-inject", | ||
exports = [ | ||
maven("io.micronaut:micronaut-core"), | ||
maven("io.micronaut:micronaut-inject"), | ||
maven("io.micronaut:micronaut-inject-java"), | ||
maven("io.micronaut:micronaut-validation"), | ||
], | ||
runtime_deps = [ | ||
maven("io.micronaut:micronaut-core"), | ||
maven("io.micronaut:micronaut-inject"), | ||
maven("io.micronaut:micronaut-inject-java"), | ||
maven("io.micronaut:micronaut-validation"), | ||
] | ||
) | ||
|
||
java_library( | ||
name = "dagger_compiler", | ||
exports = ["//external:jar/com/google/dagger/dagger_compiler"], | ||
runtime_deps = [ | ||
":dagger", | ||
":dagger_producers", | ||
"//third_party/java/com/google/code/findbugs:jsr305", | ||
"//third_party/java/com/google/googlejavaformat:google_java_format", | ||
"//third_party/java/com/google/guava", | ||
"//third_party/java/com/squareup:javapoet", | ||
"//third_party/java/javax/inject:javax_inject", | ||
], | ||
) | ||
|
||
java_plugin( | ||
name = "micronaut-beans", | ||
generates_api = True, | ||
processor_class = "io.micronaut.annotation.processing.BeanDefinitionInjectProcessor", | ||
deps = [":micronaut-inject"], | ||
) | ||
|
||
java_plugin( | ||
name = "micronaut-types", | ||
generates_api = True, | ||
processor_class = "io.micronaut.annotation.processing.TypeElementVisitorProcessor", | ||
deps = [":micronaut-inject"], | ||
) | ||
|
||
java_plugin( | ||
name = "micronaut-config", | ||
generates_api = True, | ||
processor_class = "io.micronaut.annotation.processing.PackageConfigurationInjectProcessor", | ||
deps = [":micronaut-inject"], | ||
) | ||
|
||
java_library( | ||
name = "micronaut", | ||
exports = [ | ||
maven("io.micronaut:micronaut-core"), | ||
maven("io.micronaut:micronaut-inject"), | ||
maven("io.micronaut:micronaut-inject-java"), | ||
], | ||
exported_plugins = [ | ||
":micronaut-beans", | ||
":micronaut-types", | ||
":micronaut-config" | ||
], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.