Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use latest settings plugin #453

Merged
merged 2 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@
<!-- Checks for Javadoc comments. -->
<!-- See https://checkstyle.org/config_javadoc.html -->
<module name="JavadocMethod">
<property name="excludeScope" value="private"/>
<property name="accessModifiers" value="public, protected"/>
</module>
<module name="JavadocType"/>
<module name="JavadocStyle"/>
<module name="MissingJavadocType"/>
<module name="MissingJavadocType">
<property name="severity" value="warning"/>
</module>

<!-- Checks for Naming Conventions. -->
<!-- See https://checkstyle.org/config_naming.html -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package io.micronaut.kotlin.context

import io.micronaut.aop.Around
import io.micronaut.context.BeanContext
import io.micronaut.context.annotation.Context
import io.micronaut.context.annotation.Factory
Expand Down Expand Up @@ -170,8 +171,10 @@ class BeanContextTest {

@Test
fun getProxyTargetBean() {
assertSame(context.getProxyTargetBean(TestFactory.Baz::class.java, Qualifiers.byStereotype(Context::class.java))::class,
context.getProxyTargetBean<TestFactory.Baz, Context>()::class)
assertSame(
context.getProxyTargetBean(TestFactory.Boz::class.java, Qualifiers.byStereotype(Context::class.java))::class,
context.getProxyTargetBean<TestFactory.Boz, Context>()::class
)
}

@Test
Expand All @@ -180,6 +183,10 @@ class BeanContextTest {
assertSame(context.findOrInstantiateBean(TestFactory.Baz::class.java).get()::class, context.findOrInstantiateBean<TestFactory.Baz>()!!::class)
}

@Around(proxyTarget = true)
@Target(AnnotationTarget.CLASS)
annotation class ProxyTarget

@Factory
class TestFactory {

Expand All @@ -192,6 +199,10 @@ class BeanContextTest {
@Context
class Baz

@Context
@ProxyTarget
open class Boz

@Context
@Requires(property = "qux.enabled")
class Qux
Expand Down
3 changes: 1 addition & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pluginManagement {
}

plugins {
id("io.micronaut.build.shared.settings") version "6.1.0"
id("io.micronaut.build.shared.settings") version "6.1.1"
}

enableFeaturePreview 'TYPESAFE_PROJECT_ACCESSORS'
Expand All @@ -23,5 +23,4 @@ micronautBuild {
addSnapshotRepository()
importMicronautCatalog()
importMicronautCatalog("micronaut-reactor")
importMicronautCatalog("micronaut-test")
}