diff --git a/build.gradle b/build.gradle index 42dcefa..dba55bb 100644 --- a/build.gradle +++ b/build.gradle @@ -1,18 +1,21 @@ plugins { id 'java-library' id 'jacoco' - id 'com.diffplug.spotless' version '5.12.5' + id 'com.diffplug.spotless' version '5.+' id 'pmd' id 'info.solidsoft.pitest' version '1.9.11' id 'maven-publish' id 'signing' - id 'io.github.gradle-nexus.publish-plugin' version '1.1.0' + id 'io.github.gradle-nexus.publish-plugin' version '1.3.0' // For: ./gradlew --console plain jshell id 'com.github.mrsarm.jshell.plugin' version '1.2.0' } +group = 'so.dang.cool' +version = "3.0.2" + repositories { mavenCentral() } @@ -111,6 +114,10 @@ tasks.named('test') { } java { + toolchain { + languageVersion = JavaLanguageVersion.of(11) + } + withJavadocJar() withSourcesJar() } @@ -118,29 +125,27 @@ java { publishing { publications { maven(MavenPublication) { - groupId = 'so.dang.cool' artifactId = 'z' - version = '3.0.1' from components.java pom { name = 'Z' description = 'Function combinators' - url = 'https://github.com/hiljusti/z' + url = 'https://github.com/so-dang-cool/z' licenses { license { name = 'MIT License' - url = 'https://github.com/hiljusti/z/blob/HEAD/LICENSE' + url = 'https://github.com/so-dang-cool/z/blob/HEAD/LICENSE' } } developers { developer { - id = 'hiljusti' + id = 'booniepepper' name = 'J.R. Hill' - email = 'hiljusti@pm.me' + email = 'justin@so.dang.cool' url = 'https://so.dang.cool' } } @@ -154,9 +159,9 @@ publishing { } scm { - url = 'https://github.com/hiljusti/z' - connection = 'scm:git:git://github.com/hiljusti/z.git' - developerConnection = 'scm:git:git://github.com/hiljusti/z.git' + url = 'https://github.com/so-dang-cool/z' + connection = 'scm:git:git://github.com/so-dang-cool/z.git' + developerConnection = 'scm:git:git://github.com/so-dang-cool/z.git' } } } @@ -165,6 +170,14 @@ publishing { maven { url = layout.buildDirectory.dir('repo') } + maven { + name = 'GitHubPackages' + url = 'https://maven.pkg.github.com/so-dang-cool/z' + credentials { + username = 'so-dang-cool' + password = System.getenv('GITHUB_TOKEN') + } + } } } @@ -180,3 +193,13 @@ nexusPublishing { } } } + +/* === Publishing === + +To Maven Central: +$ ./gradlew build publishToSonatype closeAndReleaseSonatypeStagingRepository + +To GitHub Packages: +$ ./gradlew build publishAllPublicationsToGitHubPackagesRepository + + */