65 lines
1.9 KiB
Groovy
65 lines
1.9 KiB
Groovy
|
|
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'
|
||
|
|
]
|
||
|
|
}
|