980fb37b1a
- build.gradle: nexus 저장소 및 의존성 설정 정리
230 lines
6.6 KiB
Groovy
230 lines
6.6 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
id 'eclipse-wtp'
|
|
id 'idea'
|
|
id 'com.diffplug.eclipse.apt' version '3.41.1'
|
|
id 'net.researchgate.release' version '3.0.2'
|
|
}
|
|
idea {
|
|
module {
|
|
downloadSources = true
|
|
}
|
|
}
|
|
|
|
def nexusUrl = "https://nexus.eactive.synology.me:8090"
|
|
|
|
allprojects {
|
|
repositories {
|
|
maven {
|
|
url "${nexusUrl}/repository/maven-public/"
|
|
allowInsecureProtocol = true
|
|
}
|
|
}
|
|
}
|
|
|
|
def springVersion = "5.3.27"
|
|
//def quartzVersion = "2.2.1"
|
|
def queryDslVersion = "5.0.0"
|
|
def hibernateVersion = "5.6.15.Final"
|
|
|
|
def generatedJavaDir = "$buildDir/generated/java"
|
|
def generatedTestJavaDir = "$buildDir/generated-test/java"
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(8)
|
|
}
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDirs = [
|
|
'src/main/java',
|
|
generatedJavaDir
|
|
]
|
|
}
|
|
resources {
|
|
srcDirs = ['src/main/resources']
|
|
}
|
|
}
|
|
test {
|
|
java {
|
|
srcDirs = [
|
|
'src/test/java',
|
|
generatedTestJavaDir
|
|
]
|
|
}
|
|
resources {
|
|
srcDirs = ['src/test/resources']
|
|
}
|
|
}
|
|
}
|
|
|
|
compileJava {
|
|
options.annotationProcessorGeneratedSourcesDirectory = project.file(generatedJavaDir)
|
|
}
|
|
|
|
compileTestJava {
|
|
options.annotationProcessorGeneratedSourcesDirectory = project.file(generatedTestJavaDir)
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.encoding = 'UTF-8'
|
|
options.compilerArgs += [
|
|
'-Amapstruct.verbose=false'
|
|
]
|
|
aptOptions {
|
|
processorArgs = ['querydsl.generatedAnnotationClass': 'com.querydsl.core.annotations.Generated']
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// api project(':kjb-safedb')
|
|
|
|
api "com.querydsl:querydsl-jpa:${queryDslVersion}"
|
|
api "com.querydsl:querydsl-apt:${queryDslVersion}"
|
|
api "org.mapstruct:mapstruct:1.5.5.Final", "org.projectlombok:lombok:1.18.28"
|
|
|
|
// project > properties > Java Compiler > Annoation Processing
|
|
annotationProcessor "org.projectlombok:lombok:1.18.28", "org.projectlombok:lombok-mapstruct-binding:0.2.0", "org.mapstruct:mapstruct-processor:1.5.5.Final", "com.querydsl:querydsl-apt:${queryDslVersion}:jpa", "jakarta.persistence:jakarta.persistence-api:2.2.3", "jakarta.annotation:jakarta.annotation-api:1.3.5"
|
|
|
|
// implementation files(rootProject.file('libs/elink-common-data-4.5.jar'));
|
|
implementation 'com.eactive.elink.common:elink-common-data:4.5.5'
|
|
|
|
api 'org.springframework.data:spring-data-jpa:2.7.17'
|
|
|
|
api "org.hibernate:hibernate-core:${hibernateVersion}"
|
|
api "org.hibernate:hibernate-entitymanager:${hibernateVersion}"
|
|
api "org.hibernate:hibernate-ehcache:${hibernateVersion}"
|
|
api "org.hibernate:hibernate-validator:5.4.3.Final"
|
|
api "org.hibernate:hibernate-envers:${hibernateVersion}"
|
|
|
|
api 'org.springframework.data:spring-data-envers:2.7.17'
|
|
|
|
api "org.springframework:spring-aspects:${springVersion}"
|
|
|
|
api group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
|
|
|
|
api "org.springframework:spring-web:${springVersion}"
|
|
api group: 'commons-io', name: 'commons-io', version: '2.11.0'
|
|
|
|
|
|
|
|
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
|
testImplementation 'ch.qos.logback:logback-classic:1.2.10'
|
|
testImplementation 'ch.qos.logback:logback-access:1.2.10'
|
|
testImplementation 'ch.qos.logback:logback-core:1.2.10'
|
|
testImplementation 'org.slf4j:jul-to-slf4j:1.7.35'
|
|
testImplementation 'org.slf4j:jcl-over-slf4j:1.7.35'
|
|
testImplementation 'org.slf4j:log4j-over-slf4j:1.7.35'
|
|
testImplementation 'org.slf4j:slf4j-api:1.7.35'
|
|
testAnnotationProcessor "org.projectlombok:lombok:1.18.28"
|
|
|
|
testRuntimeOnly 'com.h2database:h2:2.1.214'
|
|
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
|
|
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.8.2'
|
|
}
|
|
|
|
test {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
archiveClassifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
publishing {
|
|
repositories {
|
|
maven {
|
|
name = 'eactiveRepository'
|
|
def releasesRepoUrl = "${nexusUrl}/repository/maven-releases/"
|
|
def snapshotsRepoUrl = "${nexusUrl}/repository/maven-snapshots/"
|
|
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
|
credentials(PasswordCredentials)
|
|
}
|
|
}
|
|
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
pom {
|
|
description = "eLink Core JPA module"
|
|
licenses {
|
|
license {
|
|
name = "Commercial License"
|
|
url = "http://eactive.co.kr"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
task settingEclipseEncoding {
|
|
if (project.file('.settings').exists()) {
|
|
File f = file('.settings/org.eclipse.core.resources.prefs')
|
|
f.write('eclipse.preferences.version=1\n')
|
|
f.append('encoding/<project>=utf-8')
|
|
}
|
|
}
|
|
|
|
task initDirs() {
|
|
if (!project.file(generatedJavaDir).exists()) {
|
|
file(generatedJavaDir).mkdirs()
|
|
}
|
|
|
|
if (!project.file(generatedTestJavaDir).exists()) {
|
|
file(generatedTestJavaDir).mkdirs()
|
|
}
|
|
}
|
|
|
|
eclipse {
|
|
synchronizationTasks settingEclipseEncoding, initDirs
|
|
jdt {
|
|
apt {
|
|
genSrcDir = file(generatedJavaDir)
|
|
genTestSrcDir = file(generatedTestJavaDir)
|
|
}
|
|
}
|
|
project {
|
|
if (!natures.contains('org.eclipse.buildship.core.gradleprojectnature')) {
|
|
natures.add('org.eclipse.buildship.core.gradleprojectnature')
|
|
buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
|
|
}
|
|
}
|
|
}
|
|
|
|
tasks.named('eclipse').configure {
|
|
finalizedBy 'compileJava', 'compileTestJava'
|
|
}
|
|
|
|
idea {
|
|
module {
|
|
generatedSourceDirs.add(file(generatedJavaDir))
|
|
generatedSourceDirs.add(file(generatedTestJavaDir))
|
|
}
|
|
|
|
}
|
|
|
|
|
|
tasks.test {
|
|
if (project.hasProperty("safedb")) {
|
|
println "======================== SafeDB Classpath applied to test task ====================="
|
|
|
|
classpath += files("/safedb/JavaAPI/config")
|
|
classpath += fileTree(dir: "/safedb/JavaAPI/lib", include: ["*.jar"])
|
|
|
|
classpath.each { println "classpath : $it" }
|
|
|
|
systemProperty "safedb", project.property("safedb")
|
|
println "systemProperty \"safedb\", ${project.property("safedb")}"
|
|
println "-------------------------------------------------------------------------------------"
|
|
|
|
testLogging {
|
|
showStandardStreams = true
|
|
}
|
|
}
|
|
} |