121 lines
3.9 KiB
Groovy
121 lines
3.9 KiB
Groovy
plugins {
|
|
id 'net.woggioni.gradle.lombok' apply false
|
|
id 'net.woggioni.gradle.wildfly'
|
|
id 'war'
|
|
id 'maven-publish'
|
|
}
|
|
|
|
import net.woggioni.gradle.wildfly.Deploy2WildflyTask
|
|
|
|
allprojects {
|
|
apply plugin: 'net.woggioni.gradle.lombok'
|
|
|
|
group = 'net.woggioni'
|
|
version = getProperty('jpacrepo.version')
|
|
|
|
repositories {
|
|
maven {
|
|
url = 'https://woggioni.net/mvn/'
|
|
content {
|
|
includeGroup 'net.woggioni'
|
|
includeGroup 'com.lys'
|
|
}
|
|
}
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
implementation platform(group: 'com.lys', name: 'lys-dependencies', version: getProperty('lys.version'))
|
|
}
|
|
|
|
lombok {
|
|
version = getProperty('lombok.version')
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.release = 11
|
|
}
|
|
|
|
tasks.withType(Test) {
|
|
useJUnitPlatform()
|
|
}
|
|
}
|
|
|
|
|
|
dependencies {
|
|
implementation project(':jpacrepo-impl')
|
|
implementation group: 'net.woggioni', name: 'jwo'
|
|
implementation group: 'org.slf4j', name: 'slf4j-api'
|
|
|
|
compileOnly group: 'org.hibernate', name: 'hibernate-jpamodelgen'
|
|
// compileOnly group: 'jakarta.persistence',
|
|
// name: 'jakarta.persistence-api', version: getProperty('jakarta.persistence.version')
|
|
// compileOnly group: 'jakarta.annotation',
|
|
// name: 'jakarta.annotation-api',
|
|
// version: getProperty('jakarta.annotation.version')
|
|
// compileOnly group: 'jakarta.platform',
|
|
// name: 'jakarta.jakartaee-web-api',
|
|
// version: getProperty('jakarta.ee.version')
|
|
compileOnly group: 'jakarta.platform', name: 'jakarta.jakartaee-api'
|
|
implementation group: 'org.apache.commons', name: 'commons-compress'
|
|
implementation group: 'net.java.dev.jna', name: 'jna'
|
|
|
|
// compileOnly group: 'jakarta.inject',
|
|
// name: 'jakarta.inject-api', version: getProperty('jakarta.inject.version')
|
|
// compileOnly group: 'jakarta.enterprise', name: 'jakarta.enterprise.cdi-api', version: getProperty('jakarta.cdi.version')
|
|
|
|
testImplementation group: 'jakarta.platform', name: 'jakarta.jakartaee-api'
|
|
|
|
// testImplementation group: 'jakarta.platform',
|
|
// name: 'jakarta.jakartaee-web-api',
|
|
// version: getProperty('jakarta.ee.version')
|
|
testImplementation group: 'org.jboss', name: 'jboss-ejb-client'
|
|
testImplementation group: 'org.jboss.weld.se', name: 'weld-se-core'
|
|
testImplementation group: 'com.h2database', name: 'h2'
|
|
testImplementation group: 'org.hibernate', name: 'hibernate-core'
|
|
testImplementation group: 'org.jboss.resteasy', name: 'resteasy-client'
|
|
testImplementation group: 'org.jboss.resteasy', name: 'resteasy-jackson2-provider'
|
|
testRuntimeOnly group: 'org.slf4j', name: 'slf4j-simple'
|
|
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api'
|
|
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params'
|
|
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine'
|
|
}
|
|
|
|
wrapper {
|
|
distributionType = Wrapper.DistributionType.BIN
|
|
gradleVersion = getProperty('gradle.version')
|
|
}
|
|
|
|
File nimDir = project.file('nim')
|
|
File srcDir = new File(nimDir, 'src')
|
|
File staticDir = new File(nimDir, 'static')
|
|
|
|
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'
|
|
workingDir(nimDir)
|
|
}
|
|
|
|
Provider<War> warTaskProvider = tasks.named('war', War) {
|
|
from staticDir
|
|
from nimCompileTaskProvider
|
|
}
|
|
|
|
tasks.named('deploy2Wildfly', Deploy2WildflyTask) {
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
url = 'https://mvn.woggioni.net/'
|
|
}
|
|
}
|
|
publications {
|
|
maven(MavenPublication) {
|
|
from(components["web"])
|
|
}
|
|
}
|
|
}
|