plugins { id 'org.springframework.boot' version '2.3.0.RELEASE' id 'com.github.node-gradle.node' version '2.2.4' id 'io.miret.etienne.sass' version '1.1.1' id "com.leobia.gradle.jsgradlecompiler" version "0.3.0" } apply plugin: 'java' apply plugin: 'io.spring.dependency-management' apply plugin: 'jacoco' apply plugin: 'war' group = 'info.textgrid.rep' version = '3.1.3-SNAPSHOT' sourceCompatibility = '1.8' repositories { mavenCentral() maven { url 'https://nexus.gwdg.de/repository/maven-dariah-public' } } dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.apache.tomcat.embed:tomcat-embed-jasper' implementation 'javax.servlet:jstl' implementation 'org.apache.cxf:cxf-rt-rs-client:3.3.6' implementation 'io.jsonwebtoken:jjwt:0.9.1' implementation 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider' implementation 'com.atlassian.commonmark:commonmark:0.14.0' implementation 'com.atlassian.commonmark:commonmark-ext-heading-anchor:0.14.0' implementation 'com.atlassian.commonmark:commonmark-ext-gfm-tables:0.14.0' implementation 'com.atlassian.commonmark:commonmark-ext-yaml-front-matter:0.14.0' implementation 'info.textgrid.middleware.clients:textgrid-clients:3.4.3' developmentOnly("org.springframework.boot:spring-boot-devtools") testImplementation('org.springframework.boot:spring-boot-starter-test') { exclude group: 'org.junit.vintage', module: 'junit-vintage-engine' } } test { useJUnitPlatform() } // show deprecation and unchecked warnings when compiling java src tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" } /** * node / npm dependencies */ node { // Version of node to use. version = '12.14.1' // Version of npm to use. npmVersion = '6.13.4' // If true, it will download node using above parameters. // If false, it will try to use globally installed node. download = true } // npm install should be run before processResources processResources.dependsOn npmInstall processResources.dependsOn compileSass processResources.dependsOn compileJs // copy static files to web application processResources { from ('docs') { into 'docs' } from('node_modules/font-awesome/fonts') { into 'static/fonts' } from ('node_modules/jquery/dist/jquery.min.js') { into 'static/js' } from ('node_modules/openseadragon/build/openseadragon/openseadragon.min.js') { into 'static/js' } from ('node_modules/openseadragon/build/openseadragon/images') { into 'static/images/openseadragon' } from ("${buildDir}/sass/") { into 'static/css' } from ("${buildDir}/js/") { into 'static/js' } } jsOptions { inputPath = file("./src/main/resources/static/js/") outputPath = file("${buildDir}/js/") compilationLevel = "SIMPLE_OPTIMIZATIONS" jsVersionIn = 'ECMASCRIPT_2020' jsVersionOut = 'ECMASCRIPT5' combineAllFiles = false keepSameName = false } test { finalizedBy jacocoTestReport } jacocoTestReport { reports { csv.enabled true } }