87 lines
2.0 KiB
Groovy
87 lines
2.0 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'maven-publish'
|
|
}
|
|
|
|
group = 'com.caliverse.analyzer'
|
|
version = '1.0.0'
|
|
|
|
java {
|
|
sourceCompatibility = '17'
|
|
targetCompatibility = '17'
|
|
}
|
|
|
|
compileJava {
|
|
options.encoding = 'UTF-8'
|
|
}
|
|
|
|
compileTestJava {
|
|
options.encoding = 'UTF-8'
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
// 로깅 (라이브러리이므로 API만 포함, 구현체는 사용자가 선택)
|
|
implementation 'org.slf4j:slf4j-api:2.0.9'
|
|
|
|
implementation 'com.google.code.gson:gson:2.10.1'
|
|
|
|
// HTTP 연결 및 요청을 위한 라이브러리
|
|
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
|
|
|
|
// JSON 파싱 라이브러리
|
|
implementation 'org.json:json:20250517'
|
|
implementation 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
|
|
|
|
// 테스트 라이브러리
|
|
testImplementation 'junit:junit:4.13.2'
|
|
testImplementation 'ch.qos.logback:logback-classic:1.4.11'
|
|
}
|
|
|
|
jar {
|
|
manifest {
|
|
attributes 'Implementation-Title': 'Video URL Analyzer',
|
|
'Implementation-Version': version,
|
|
'Main-Class': 'com.caliverse.analyzer.VideoAnalyzer'
|
|
}
|
|
|
|
// 의존성을 포함한 Jar 파일 생성 (Fat JAR)
|
|
from {
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
|
|
// 중복 파일 처리
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
}
|
|
|
|
// 테스트 설정
|
|
test {
|
|
useJUnit()
|
|
testLogging {
|
|
events "passed", "skipped", "failed"
|
|
exceptionFormat "full"
|
|
}
|
|
}
|
|
|
|
tasks.register('fatJar', Jar) {
|
|
archiveClassifier = 'all'
|
|
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
|
|
manifest.attributes['Main-Class'] = 'com.caliverse.analyzer.VideoAnalyzer'
|
|
from {
|
|
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
|
|
}
|
|
with jar
|
|
}
|
|
|
|
// Maven 발행 설정 (선택사항)
|
|
publishing {
|
|
publications {
|
|
maven(MavenPublication) {
|
|
from components.java
|
|
}
|
|
}
|
|
}
|