@@ -4,19 +4,18 @@ plugins {
44}
55
66description = " MYA web-based query tool"
7- version new File (" ${ projectDir} /VERSION" ). text. trim()
7+ version = new File (" ${ projectDir} /VERSION" ). text. trim()
8+ ext. version = project. version
89ext. releaseDate = new Date (). format(' MMM dd yyyy' )
910
10- tasks. withType(JavaCompile ) {
11+ tasks. withType(JavaCompile ). configureEach {
1112 options. release = 17
1213 options. encoding = ' UTF-8'
1314 options. compilerArgs << " -Xlint:unchecked" << " -Xlint:deprecation"
1415}
15-
1616repositories {
1717 mavenCentral()
1818}
19-
2019sourceSets {
2120 integration {
2221 java. srcDir " ${ projectDir} /src/integration/java"
@@ -25,20 +24,17 @@ sourceSets {
2524 runtimeClasspath + = sourceSets. main. output
2625 }
2726}
28-
2927configurations {
3028 integrationImplementation. extendsFrom testImplementation
3129 integrationRuntimeOnly. extendsFrom runtimeOnly
3230}
33-
3431dependencies {
3532 implementation ' org.jlab:jmyapi:9.0.0' ,
3633 ' org.eclipse.parsson:parsson:1.1.1'
3734 providedCompile ' jakarta.servlet:jakarta.servlet-api:6.0.0'
3835 testImplementation ' junit:junit:4.13.2'
3936}
40-
41- task integrationTest (type : Test ) {
37+ tasks. register(' integrationTest' , Test ) {
4238 description = ' Runs integration tests.'
4339 group = ' verification'
4440
@@ -51,12 +47,14 @@ task integrationTest(type: Test) {
5147 showStandardStreams = true
5248 }
5349}
54-
50+ tasks. named(' jar' ) {
51+ enabled = false
52+ }
5553war {
5654 archiveFileName = ' myquery.war'
5755 filesMatching(' WEB-INF/web.xml' ) {
5856 filter {
59- String line -> line. replaceAll(" @VERSION@" , project . version)
57+ String line -> line. replaceAll(" @VERSION@" , version)
6058 }
6159 filter {
6260 String line -> line. replaceAll(" @RELEASE_DATE@" , releaseDate)
0 commit comments