This commit is contained in:
hdvt
2025-11-09 17:36:37 +03:00
parent 4308c10860
commit ae72e2208b
14 changed files with 598 additions and 0 deletions

65
build.gradle Normal file
View File

@@ -0,0 +1,65 @@
plugins {
id 'java-library'
id 'maven-publish'
}
repositories {
mavenCentral()
maven {
name = "nex"
url = "https://nexus.hdvtdev.tech"
}
}
group = 'hdvtdev'
version = '1.0.0'
publishing {
publications {
asyncy(MavenPublication) {
from components.java
}
}
repositories {
maven {
name = 'Nexus'
def releasesRepoUrl = "https://nexus.hdvtdev.tech/repository/maven-releases/"
def snapshotsRepoUrl = "http://nexus.hdvtdev.tech/repository/maven-snapshots/"
url = version.toString().endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = project.findProperty('nexusUsername') ?: System.getenv('NEXUS_USERNAME')
password = project.findProperty('nexusPassword') ?: System.getenv('NEXUS_PASSWORD')
}
}
}
}
dependencies {
implementation 'com.google.auto.service:auto-service:1.1.1'
annotationProcessor 'com.google.auto.service:auto-service:1.1.1'
}
tasks.register('fat', Jar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from sourceSets.main.output
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs += [
'--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED',
'--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED'
]
}