//file:noinspection GroovyAssignabilityCheck plugins { id 'java' id 'maven-publish' id 'jacoco' } project.group = 'ghast' jar.archiveBaseName.set(project.name) project.version = '1.13' def gitlab_projectid = 23328133 compileJava { sourceCompatibility = targetCompatibility = JavaVersion.VERSION_1_8 options.encoding = 'UTF-8' } repositories { mavenCentral() maven { url 'https://hub.spigotmc.org/nexus/content/groups/public' } } def lombokVersion = '1.18.22' def junitVersion = '5.8.1' def bukkitVersion = '1.12.2-R0.1-SNAPSHOT' dependencies { annotationProcessor("org.projectlombok:lombok:$lombokVersion") compileOnly("org.projectlombok:lombok:$lombokVersion") compileOnly("org.bukkit:bukkit:$bukkitVersion") { exclude(module: 'gson') exclude(module: 'json-simple') exclude(module: 'commons-lang') exclude(module: 'snakeyaml') } implementation('org.apache.commons:commons-text:1.9') implementation('org.jooq:joor-java-8:0.9.14') testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion") testImplementation("org.junit.jupiter:junit-jupiter-engine:$junitVersion") testImplementation('org.mockito:mockito-core:4.0.0') testImplementation('org.jooq:joor-java-8:0.9.14') testImplementation("org.bukkit:bukkit:$bukkitVersion") { exclude(module: 'gson') exclude(module: 'json-simple') exclude(module: 'commons-lang') exclude(module: 'snakeyaml') } testImplementation('com.h2database:h2:1.4.200') } test { useJUnitPlatform() } jacoco { toolVersion = '0.8.5' } jacocoTestReport { dependsOn test } publishing { publications { mavenBinary(MavenPublication) { groupId = project.group artifactId = project.name version = project.version from components.java } } repositories { maven { url "https://gitlab.com/api/v4/projects/${gitlab_projectid}/packages/maven" credentials(HttpHeaderCredentials) { name = 'Job-Token' value = System.getenv('CI_JOB_TOKEN') } authentication { header(HttpHeaderAuthentication) } } } }