Files
nbt-lib/build.gradle

81 lines
1.7 KiB
Groovy

plugins {
id 'java'
id 'jacoco'
id 'maven-publish'
}
wrapper {
gradleVersion = '8.5'
distributionType = Wrapper.DistributionType.BIN
}
group = 'mc.nbt'
version = '2.0'
compileJava {
targetCompatibility = sourceCompatibility = JavaVersion.VERSION_17
options.encoding = 'UTF-8'
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
def junit5_version = '5.9.2'
testImplementation("org.junit.jupiter:junit-jupiter-api:${junit5_version}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junit5_version}")
testImplementation("org.junit.jupiter:junit-jupiter-params:${junit5_version}")
testImplementation('org.apache.commons:commons-lang3:3.12.0')
}
test {
useJUnitPlatform()
}
jacoco {
toolVersion = '0.8.7'
}
jacocoTestReport {
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it,
exclude: ['mc/network/api/io/**']
)
}))
}
}
publishing {
publications {
mavenBinary(MavenPublication) {
groupId = project.group
artifactId = project.name
version = project.version
from components.java
}
}
repositories {
maven {
name = 'Di9'
url = uri('https://di9.ru/git/api/packages/Minecraft/maven')
def giteaToken = System.getenv("GITEA_TOKEN")
credentials(HttpHeaderCredentials) {
name = 'Authorization'
value = "token ${giteaToken}"
}
authentication {
header(HttpHeaderAuthentication)
}
}
}
}