Files
elink-online-core/build.gradle
T
2025-11-26 16:31:01 +09:00

160 lines
4.3 KiB
Groovy

plugins {
id 'java-library'
id 'maven-publish'
id 'eclipse-wtp'
id 'idea'
id 'com.diffplug.eclipse.apt' version '3.41.1'
}
group 'com.eactive'
version '4.5.1-SNAPSHOT'
def springVersion = "5.3.27"
//def quartzVersion = "2.2.1"
def queryDslVersion = "5.0.0"
def hibernateVersion = "5.6.15.Final"
def nexusUrl = "https://nexus.eactive.synology.me:8090"
def generatedJavaDir = "$buildDir/generated/java"
// FOR LOCAL
repositories {
maven {
url "${nexusUrl}/repository/maven-public/"
allowInsecureProtocol = true
}
}
//
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
}
}
compileJava {
options.encoding = 'UTF-8'
options.compilerArgs += [
'-Amapstruct.verbose=false'
]
sourceSets.main.java { srcDir generatedJavaDir }
options.generatedSourceOutputDirectory = project.file(generatedJavaDir)
aptOptions {
processorArgs = [ 'querydsl.generatedAnnotationClass' : 'com.querydsl.core.annotations.Generated' ]
}
}
jar {
exclude '**/persistence.xml'
}
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
dependencies {
// 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"
annotationProcessor "com.querydsl:querydsl-apt:${queryDslVersion}:jpa", "jakarta.persistence:jakarta.persistence-api:2.2.3", "jakarta.annotation:jakarta.annotation-api:1.3.5"
api project(':elink-online-core-jpa')
api group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
api group: 'commons-io', name: 'commons-io', version: '2.11.0'
api group: 'commons-beanutils', name: 'commons-beanutils', version: '1.6.1'
api "com.rabbitmq:amqp-client:3.6.6"
api 'ch.qos.logback:logback-classic:1.2.10'
api 'ch.qos.logback:logback-core:1.2.10'
api 'co.elastic.logging:logback-ecs-encoder:1.5.0'
//api 'com.eactive:json-simple-1.1.1-custom:1.2'
api "org.springframework:spring-context-support:${springVersion}"
api 'jakarta.interceptor:jakarta.interceptor-api:2.1.0'
implementation 'com.nimbusds:nimbus-jose-jwt:9.24.3' //jwhong
compileOnly group: 'com.ibm.db2', name: 'jcc', version: '11.5.7.0'
testRuntimeOnly 'com.h2database:h2:2.1.214'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.6.15'
}
test {
useJUnitPlatform()
}
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 module"
licenses {
license {
name = "Commercial License"
url = "http://eactive.co.kr"
}
}
}
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
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()
}
}
eclipse {
synchronizationTasks settingEclipseEncoding, initDirs
jdt {
apt {
genSrcDir = file(generatedJavaDir)
}
}
project {
natures = ['org.eclipse.buildship.core.gradleprojectnature',
'org.eclipse.jdt.core.javanature',
'org.eclipse.wst.common.project.facet.core.nature',
'org.eclipse.wst.common.modulecore.ModuleCoreNature',
'org.eclipse.jem.workbench.JavaEMFNature']
buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
buildCommand 'org.eclipse.wst.validation.validationbuilder'
buildCommand 'org.eclipse.wst.common.project.facet.core.builder'
buildCommand 'org.eclipse.jdt.core.javabuilder'
}
}