Files
rbcs/build.gradle

83 lines
2.3 KiB
Groovy

plugins {
id 'org.jetbrains.kotlin.jvm'
id 'net.woggioni.gradle.envelope'
id 'maven-publish'
}
import net.woggioni.gradle.envelope.EnvelopeJarTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
group = 'net.woggioni'
version = getProperty('gbcs.version')
repositories {
maven {
url = 'https://woggioni.net/mvn'
content {
includeModule 'net.woggioni', 'jwo'
includeGroup 'com.lys'
}
}
mavenCentral()
}
dependencies {
implementation platform(group: 'com.lys', name: 'lys-dependencies', version: getProperty('lys.version'))
implementation group: 'net.woggioni', name: 'jwo'
implementation group: 'org.slf4j', name: 'slf4j-api'
implementation group: 'io.netty', name: 'netty-codec-http'
runtimeOnly group: 'org.slf4j', name: 'slf4j-jdk14'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine'
}
java {
withSourcesJar()
}
tasks.named(JavaPlugin.COMPILE_JAVA_TASK_NAME, JavaCompile) {
modularity.inferModulePath = true
options.compilerArgs << '--patch-module' << 'net.woggioni.gbcs=' + project.sourceSets.main.output.asPath
options.release = 17
}
tasks.named("compileKotlin", KotlinCompile.class) {
kotlinOptions {
jvmTarget = 17
}
}
Provider<EnvelopeJarTask> envelopeJarTaskProvider = tasks.named('envelopeJar', EnvelopeJarTask.class) {
mainModule = 'net.woggioni.gbcs'
mainClass = 'net.woggioni.gbcs.GradleBuildCacheServer'
systemProperty 'java.util.logging.config.class', 'net.woggioni.gbcs.LoggingConfig'
systemProperty 'log.config.source', 'logging.properties'
}
wrapper {
distributionType = Wrapper.DistributionType.BIN
gradleVersion = getProperty('gradle.version')
}
def envelopeJarArtifact = artifacts.add('archives', envelopeJarTaskProvider.get().archiveFile.get().asFile) {
type = 'jar'
builtBy envelopeJarTaskProvider
}
publishing {
repositories {
maven {
url = 'https://mvn.woggioni.net/'
}
}
publications {
maven(MavenPublication) {
artifact envelopeJarArtifact
}
}
}