import java.util.concurrent.TimeUnit import org.gradle.api.tasks.Copy plugins { // Apply the application plugin to add support for building a CLI application in Java. id 'application' } // Global checkstyle file ext.checkstyleConfigFile = new File(rootDir, "/config/checkstyle/sun_checks.xml") dependencies { repositories { // Use Maven Central for resolving dependencies. mavenCentral() } } def projectVersion = rootProject.file('VERSION').text.trim() def buildTime = { -> Date latestdate = new Date(); def time = latestdate.getTime(); long seconds = TimeUnit.MILLISECONDS.toSeconds(time); return seconds; } def gitHash = { -> def gitProcess = 'git rev-parse --short HEAD'.execute(); gitProcess.waitFor(); def shortHash = gitProcess.text.trim(); def gitHash = shortHash.substring(0, shortHash.length() - 2); return gitHash; } project.ext["jarVersion"] = "${projectVersion}.${buildTime}.${gitHash}" project.ext["packageVersion"] = "${projectVersion}.${buildTime}.${gitHash}.el8" //dependencies { // implementation project(':HIRS_Utils') // implementation project(':HIRS_AttestationCA') // // implementation 'org.springframework.boot:spring-boot-starter-web' // implementation 'org.springframework.boot:spring-boot-starter-validation' // implementation 'org.springframework.boot:spring-boot-starter-data-jpa' // implementation 'org.projectlombok:lombok:1.18.26' // implementation 'org.bouncycastle:bcmail-jdk15on:1.70' // implementation 'org.springframework.plugin:spring-plugin-core:3.0.0' // implementation 'org.apache.httpcomponents:httpclient:4.5.7' // implementation 'com.google.guava:guava:31.1-jre' // implementation 'org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.0' // implementation 'com.github.marandus:pci-ids:0.3' // implementation 'org.apache.httpcomponents.client5:httpclient5:5.2.1' // implementation 'commons-codec:commons-codec:1.15' // implementation 'org.apache.commons:commons-lang3:3.12.0' // implementation 'org.apache.logging.log4j:log4j-core:2.19.0' // implementation 'org.apache.logging.log4j:log4j-api:2.19.0' // implementation 'com.eclipsesource.minimal-json:minimal-json:0.9.5' // implementation 'com.fasterxml.jackson.core:jackson-core:2.14.2' // implementation 'com.fasterxml.jackson.core:jackson-databind:2.14.2' // implementation "org.glassfish.jaxb:jaxb-runtime:4.0.1" // implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0' //// implementation 'com.sun.xml.bind:jaxb-impl:4.0.2' //creates duplicate error // compileOnly 'org.projectlombok:lombok:1.18.26' // runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' // annotationProcessor 'org.projectlombok:lombok:1.18.26' // providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' // // testImplementation 'org.springframework.boot:spring-boot-starter-test' //} // // ////task generateXjcLibrary(type:Exec) { //// workingDir 'config' //// //// commandLine './genXjcLibrary.sh' ////} ////compileJava.dependsOn generateXjcLibrary // ////ospackage { //// packageName = 'HIRS_AttestationCA' //// os = LINUX //// arch = NOARCH //// release = '1' //// //// user 'root' //// fileMode = 0755 //// //// addParentDirs = true //// createDirectoryEntry true //// //// into ("/opt/tomcat/webapps") { //// from war.outputs.files //// from '../HIRS_AttestationCAPortal/build/libs/HIRS_AttestationCAPortal.war' //// user 'root' //// fileMode = 0755 //// } //// //// buildRpm { //// arch = X86_64 //// }