@@ -35,14 +35,23 @@ muzzle {
3535 module = ' mule-core'
3636 versions = " [$muleVersion ,)"
3737 javaVersion = " 17"
38- assertInverse true
3938 excludeDependency ' om.google.guava:guava'
4039 excludeDependency ' com.google.code.findbugs:jsr305'
4140 additionalDependencies + = " org.mule.runtime:mule-tracer-customization-impl:$muleVersion "
4241 }
42+
43+ fail {
44+ name = ' before-4.5.0'
45+ group = ' org.mule.runtime'
46+ module = ' mule-core'
47+ versions = " [, $muleVersion )"
48+ excludeDependency ' om.google.guava:guava'
49+ excludeDependency ' com.google.code.findbugs:jsr305'
50+ }
4351}
4452
4553apply from : " $rootDir /gradle/java.gradle"
54+ apply plugin : " idea"
4655
4756addTestSuiteForDir(' mule46ForkedTest' , ' test' )
4857addTestSuiteForDir(' latestDepForkedTest' , ' test' )
@@ -81,6 +90,9 @@ configurations.all {
8190}
8291
8392sourceSets {
93+ main_java11 {
94+ java. srcDirs " ${ project.projectDir} /src/main/java11"
95+ }
8496 test {
8597 output. dir(" $buildDir /generated-resources/test" , builtBy : ' generateAppResources' )
8698 }
@@ -92,6 +104,20 @@ sourceSets {
92104 }
93105}
94106
107+ compileMain_java11Java. configure {
108+ setJavaVersion(it, 11 )
109+ sourceCompatibility = JavaVersion . VERSION_1_8
110+ targetCompatibility = JavaVersion . VERSION_1_8
111+ }
112+
113+ jar {
114+ from sourceSets. main_java11. output
115+ }
116+
117+ forbiddenApisMain_java11 {
118+ failOnMissingClasses = false
119+ }
120+
95121tasks. named(" compileTestGroovy" ). configure {
96122 dependsOn ' mvnPackage' , ' extractMuleServices'
97123}
@@ -112,7 +138,13 @@ tasks.named("compileLatestDepForkedTestJava").configure {
112138dependencies {
113139 compileOnly group : ' org.mule.runtime' , name : ' mule-core' , version : muleVersion
114140 compileOnly group : ' org.mule.runtime' , name : ' mule-tracer-customization-impl' , version : muleVersion
141+ compileOnly sourceSets. main_java11. output
115142
143+ main_java11CompileOnly project(' :internal-api' )
144+ main_java11CompileOnly project(' :dd-java-agent:agent-tooling' )
145+ main_java11CompileOnly project(' :dd-java-agent:agent-bootstrap' )
146+
147+ testImplementation sourceSets. main_java11. output
116148 testImplementation project(' :dd-java-agent:instrumentation:aws-common' )
117149 testImplementation project(' :dd-java-agent:instrumentation:reactor-core-3.1' )
118150 testImplementation project(' :dd-java-agent:instrumentation:reactive-streams' )
@@ -234,3 +266,9 @@ spotless {
234266 target " **/*.java"
235267 }
236268}
269+
270+ idea {
271+ module {
272+ jdkName = ' 11'
273+ }
274+ }
0 commit comments