Skip to content

Commit

Permalink
Merge pull request #453 from micronaut-projects/latest-settings
Browse files Browse the repository at this point in the history
Use latest settings plugin
  • Loading branch information
wetted authored Dec 16, 2022
2 parents f854088 + 904c980 commit 66f292f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
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")
}

0 comments on commit 66f292f

Please sign in to comment.