plugins { id 'java' id 'idea' id 'maven-publish' } group 'me.bvn13' version '1.2.7' repositories { mavenCentral() } dependencies { // https://mvnrepository.com/artifact/org.slf4j/slf4j-api implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.35' // https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' testImplementation 'ch.qos.logback:logback-classic:1.2.10' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1' testImplementation 'org.junit.jupiter:junit-jupiter-params:5.8.1' } test { useJUnitPlatform() } tasks.withType(Test).configureEach { maxParallelForks = 1 } task sourceJar(type: Jar) { from sourceSets.main.allJava } publishing { repositories { maven { name = "GitHubPackages" url = uri("https://maven.pkg.github.com/bvn13/sewy") credentials { username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USER") password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN") } } } publications { gpr(MavenPublication) { from(components.java) } mavenJava(MavenPublication) { from components.java artifact sourceJar { classifier "sources" } } } }