Version bump. Publish to Sonatype snapshots and fix build script.

This commit is contained in:
Alexander Söderberg 2020-10-04 20:51:48 +02:00
parent c84e906dc8
commit 15dd3abbbb
No known key found for this signature in database
GPG key ID: FACEA5B0F4C1BF80
2 changed files with 27 additions and 14 deletions

View file

@ -83,13 +83,16 @@ Feel free to use this if you want to.
## use
To use `cloud` you will first need to add it as a dependency to your project. Cloud is available from [IntellectualSites](https://intellectualsites.com)' maven repository.
To use `cloud` you will first need to add it as a dependency to your project.
Snapshot builds of Cloud are available through the [Sonatype OSS Snapshot repository](https://oss.sonatype.org/content/repositories/snapshots).
Release builds of Cloud are available throgh the Maven central repository.
**maven**:
```xml
<repository>
<id>intellectualsites-snapshots</id>
<url>https://mvn.intellectualsites.com/content/repositories/snapshots</url>
<id>sonatype-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
```
@ -97,7 +100,7 @@ To use `cloud` you will first need to add it as a dependency to your project. Cl
<dependency>
<groupId>cloud.commandframework</groupId>
<artifactId>cloud-PLATFORM</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<!--
~ Optional: Allows you to use annotated methods
@ -106,7 +109,7 @@ To use `cloud` you will first need to add it as a dependency to your project. Cl
<dependency>
<groupId>cloud.commandframework</groupId>
<artifactId>cloud-annotations</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>1.0.0-SNAPSHOT</version>
</dependency>
```

View file

@ -1,7 +1,7 @@
buildscript {
repositories {
mavenCentral()
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url = 'https://oss.sonatype.org/content/repositories/snapshots/' }
jcenter()
}
dependencies {
@ -14,11 +14,11 @@ plugins {
id 'com.github.hierynomus.license' version '0.15.0'
id 'java-library'
id 'com.github.johnrengelman.shadow' version '6.0.0'
id 'maven-publish'
id 'de.marcphilipp.nexus-publish' version '0.3.0'
}
checkstyle {
configFile file("config/checkstyle/checkstyle.xml")
configFile file('config/checkstyle/checkstyle.xml')
}
allprojects {
@ -27,7 +27,7 @@ allprojects {
apply plugin: 'com.github.hierynomus.license'
group = 'cloud.commandframework'
version = '0.3.0-SNAPSHOT'
version = '1.0.0-SNAPSHOT'
description = 'Command framework and dispatcher for the JVM'
/* Disable checkstyle on tests */
@ -43,8 +43,8 @@ allprojects {
subprojects {
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
apply plugin: 'de.marcphilipp.nexus-publish'
test {
useJUnitPlatform()
@ -106,6 +106,12 @@ subprojects {
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
}
nexusPublishing {
repositories {
sonatype()
}
}
sourceCompatibility = '1.8'
tasks.withType(JavaCompile) {
@ -114,7 +120,7 @@ subprojects {
publishing {
publications {
maven(MavenPublication) {
mavenJava(MavenPublication) {
from components.java
pom {
@ -154,8 +160,12 @@ subprojects {
}
signing {
required { project.hasProperty('signing.keyId') && gradle.taskGraph.hasTask(':publish') && !project.version.endsWith('-SNAPSHOT') }
sign publishing.publications.maven
}
required { project.hasProperty('signing.keyId')
&& (gradle.taskGraph.hasTask(':publish')
|| gradle.taskGraph.hasTask(':publishToSonatype')
|| gradle.taskGraph.hasTask(':publishToMavenLocal')) }
sign publishing.publications.mavenJava
}
}