backend migrated to Java 17
This commit is contained in:
99
build.gradle
99
build.gradle
@@ -1,6 +1,7 @@
|
||||
plugins {
|
||||
alias(catalog.plugins.lombok) apply false
|
||||
alias(catalog.plugins.wildfly)
|
||||
id 'java-library'
|
||||
id 'war'
|
||||
id 'maven-publish'
|
||||
}
|
||||
@@ -8,7 +9,22 @@ plugins {
|
||||
import net.woggioni.gradle.wildfly.Deploy2WildflyTask
|
||||
|
||||
allprojects {
|
||||
apply plugin: 'net.woggioni.gradle.lombok'
|
||||
|
||||
pluginManager.withPlugin('java-library') {
|
||||
apply plugin: 'net.woggioni.gradle.lombok'
|
||||
|
||||
lombok {
|
||||
version = catalog.versions.lombok.get()
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.release = 17
|
||||
}
|
||||
|
||||
tasks.withType(Test) {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
}
|
||||
|
||||
group = 'net.woggioni'
|
||||
version = getProperty('jpacrepo.version')
|
||||
@@ -23,24 +39,26 @@ allprojects {
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation platform(group: 'com.lys', name: 'lys-dependencies', version: getProperty('lys.version'))
|
||||
}
|
||||
configurations {
|
||||
deployableArchives {
|
||||
attributes {
|
||||
attribute(
|
||||
LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE,
|
||||
objects.named(LibraryElements.class, LibraryElements.JAR))
|
||||
}
|
||||
|
||||
lombok {
|
||||
version = getProperty('lombok.version')
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.release = 17
|
||||
}
|
||||
|
||||
tasks.withType(Test) {
|
||||
useJUnitPlatform()
|
||||
transitive = false
|
||||
canBeConsumed = false
|
||||
visible = false
|
||||
canBeResolved = true
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
modularity.inferModulePath = true
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation project(':jpacrepo-impl')
|
||||
@@ -48,19 +66,17 @@ dependencies {
|
||||
implementation catalog.jwo
|
||||
implementation catalog.slf4j.api
|
||||
|
||||
compileOnly catalog.hibernate.jpamodelgen
|
||||
compileOnly catalog.jakarta.enterprise.cdi.api
|
||||
compileOnly catalog.jakarta.servlet.api
|
||||
compileOnly catalog.jakarta.ejb.api
|
||||
compileOnly catalog.jakarta.ws.rs.api
|
||||
compileOnly catalog.jakarta.xml.bind.api
|
||||
compileOnly catalog.jakarta.enterprise.concurrent.api
|
||||
|
||||
providedCompile catalog.jakarta.persistence.api
|
||||
providedCompile catalog.jakarta.enterprise.cdi.api
|
||||
providedCompile catalog.jakarta.servlet.api
|
||||
providedCompile catalog.jakarta.ejb.api
|
||||
providedCompile catalog.jakarta.ws.rs.api
|
||||
providedCompile catalog.jakarta.xml.bind.api
|
||||
providedCompile catalog.jakarta.enterprise.concurrent.api
|
||||
|
||||
implementation catalog.commons.compress
|
||||
implementation catalog.jna
|
||||
|
||||
|
||||
testImplementation catalog.jackson.module.jakarta.xmlbind.annotations
|
||||
testImplementation catalog.jboss.ejb.client
|
||||
testImplementation catalog.weld.se.core
|
||||
@@ -69,10 +85,20 @@ dependencies {
|
||||
testImplementation catalog.resteasy.client
|
||||
testImplementation catalog.resteasy.jackson2.provider
|
||||
testImplementation catalog.jackson.datatype.jsr310
|
||||
|
||||
|
||||
testRuntimeOnly catalog.slf4j.simple
|
||||
|
||||
testImplementation catalog.junit.jupiter.api
|
||||
testImplementation catalog.junit.jupiter.params
|
||||
|
||||
testRuntimeOnly catalog.jakartaee.api
|
||||
testRuntimeOnly catalog.junit.jupiter.engine
|
||||
testRuntimeOnly group: 'org.glassfish.main.extras', name: 'glassfish-embedded-all', version: '7.0.6'
|
||||
|
||||
deployableArchives project
|
||||
deployableArchives project(':jpacrepo-impl')
|
||||
deployableArchives project(':jpacrepo-api')
|
||||
}
|
||||
|
||||
File nimDir = project.file('nim')
|
||||
@@ -83,7 +109,7 @@ Provider<Exec> nimCompileTaskProvider = tasks.register("compileNim", Exec) {
|
||||
inputs.files(project.fileTree(srcDir), project.fileTree(staticDir))
|
||||
File outputFile = new File(temporaryDir, "jpacrepo.js")
|
||||
outputs.file(outputFile)
|
||||
commandLine 'nim', 'js', "-o:$outputFile", 'src/jpacrepo.nim'
|
||||
commandLine 'nim', 'js', '-d:release', "-o:$outputFile", 'src/jpacrepo.nim'
|
||||
workingDir(nimDir)
|
||||
}
|
||||
|
||||
@@ -92,7 +118,30 @@ Provider<War> warTaskProvider = tasks.named('war', War) {
|
||||
from nimCompileTaskProvider
|
||||
}
|
||||
|
||||
tasks.named('deploy2Wildfly', Deploy2WildflyTask) {
|
||||
tasks.named('deploy2Wildfly', Deploy2WildflyTask) { d2w ->
|
||||
d2w.rpcPort = 1234
|
||||
d2w.rpcUsername = 'woggioni'
|
||||
// d2w.rpcUsername = 'admin'
|
||||
d2w.rpcPassword = '123456'
|
||||
}
|
||||
|
||||
|
||||
File warPath = tasks.named("war", War).get().archiveFile.get().getAsFile()
|
||||
tasks.named("test", Test) {
|
||||
jvmArgs = [
|
||||
'--add-opens', 'java.naming/javax.naming.spi=ALL-UNNAMED',
|
||||
'--add-opens', 'java.base/java.lang=ALL-UNNAMED',
|
||||
'--add-opens', 'java.base/java.io=ALL-UNNAMED',
|
||||
// '--add-opens', 'java.base/java.util=ALL-UNNAMED',
|
||||
// '--add-opens', 'java.management/javax.management.openmbean=ALL-UNNAMED',
|
||||
// '--add-opens', 'java.management/javax.management=ALL-UNNAMED',
|
||||
]
|
||||
// classpath = configurations.testRuntimeClasspath + sourceSets.test.output
|
||||
// File warPath = tasks.named("war", War).get().archiveFile.get().getAsFile()
|
||||
// classpath += warPath
|
||||
// classpath += tasks.named("war", War).get().outputs.files
|
||||
inputs.files(configurations.deployableArchives)
|
||||
systemProperty('jpacrepo.jar.path', configurations.deployableArchives.asPath)
|
||||
}
|
||||
|
||||
publishing {
|
||||
|
Reference in New Issue
Block a user