@@ -15,37 +15,38 @@ apply from: '../wlp-gradle/subprojects/repos.gradle'
15
15
configurations. requiredLibs {
16
16
transitive = false
17
17
}
18
+
19
+ sourceSets {
20
+ // Source set where we don't include parameter names
21
+ noParamNamesTest {
22
+ java {
23
+ srcDirs = [' noParamTest' ]
24
+ }
25
+ }
26
+ }
27
+
18
28
dependencies {
19
29
requiredLibs ' org.json:json:20080701' ,
20
30
' org.skyscreamer:jsonassert:2.0-rc1'
31
+ noParamNamesTestCompileOnly project(' :io.openliberty.mcp' ),
32
+ project(path : ' :io.openliberty.jakarta' , configuration : ' cdi40' )
33
+ implementation sourceSets. noParamNamesTest. output
21
34
}
35
+
22
36
/* Added to allow method parmaters to be available for MCP Tool Server*/
23
37
// Allow us to test getting the name of a tool argument directly from the Java
24
38
compileJava {
25
- options. compilerArgs << ' -parameters'
26
- }
27
-
28
- sourceSets {
29
- main {
30
- java {
31
- srcDirs = [' fat/src' ]
32
- }
33
- }
34
- noParamNamesTest {
35
- java {
36
- srcDirs = [' noParamTest' ]
37
- }
38
- compileClasspath + = sourceSets. main. compileClasspath
39
- runtimeClasspath + = sourceSets. main. runtimeClasspath + output
40
- }
39
+ options. compilerArgs << ' -parameters'
41
40
}
42
41
43
- task noParamNamesTest (type : Test ) {
44
- description = " Compiles without -parameters"
45
-
46
- testClassesDirs = sourceSets. noParamNamesTest. output. classesDirs
42
+ // Build the noParamNamesTest code into a jar
43
+ tasks. register(' noParamNamesTestJar' , Jar ) {
44
+ dependsOn noParamNamesTestClasses
45
+ from sourceSets. noParamNamesTest. output
46
+ archiveFileName = ' noParamNamesTest.jar'
47
47
}
48
48
49
- tasks. named(" compileNoParamNamesTestJava" ){
50
- options. compilerArgs. remove(' -parameters' )
49
+ // Build the noParamNamesTest jar before the autoFVT zip so that it gets included in the zip
50
+ tasks. named(' autoFVT' ) {
51
+ dependsOn noParamNamesTestJar
51
52
}
0 commit comments