Files
MethodAtlas/build.gradle
Leo Galambos 63f6b8c803 feat: add @Tag reporting and CSV/plain output
- Default CSV output with header; -plain enables labeled text format
- Extract repeated @Tag and @Tags container values
- Configure JavaParser language level for modern syntax (records)
- Add fixture-based JUnit tests and README usage/examples
2026-02-11 02:10:48 +01:00

69 lines
1.6 KiB
Groovy

plugins {
id 'java'
id 'application'
}
group = 'org.egothor.methodatlas'
version = '0.1.0-SNAPSHOT'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.github.javaparser:javaparser-core:3.28.0'
testImplementation(platform("org.junit:junit-bom:5.14.2"))
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
application {
mainClass = 'org.egothor.methodatlas.MethodAtlasApp'
}
tasks.test {
useJUnitPlatform()
}
jar {
manifest {
attributes(
'Main-Class': application.mainClass,
'Implementation-Title': rootProject.name,
'Implementation-Version': "${version}"
)
}
from sourceSets.main.output
dependsOn configurations.runtimeClasspath
// Include each JAR dependency
configurations.runtimeClasspath.findAll { it.exists() && it.name.endsWith('.jar') }.each { jarFile ->
def jarName = jarFile.name.replaceAll(/\.jar$/, '')
from(zipTree(jarFile)) {
// Exclude signature-related files
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA'
// Rename license/notice files to avoid conflicts
eachFile { file ->
if (file.path ==~ /META-INF\/(LICENSE|NOTICE)(\..*)?/) {
file.path = "META-INF/licenses-from-${jarName}/${file.name}"
}
}
includeEmptyDirs = false
}
}
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}