Skip to content

Commit

Permalink
Merge branch '1.16' into 1.17
Browse files Browse the repository at this point in the history
# Conflicts:
#	gradle.properties
#	release.gradle
  • Loading branch information
Pyrofab committed May 6, 2021
2 parents e15f395 + 136d81c commit fd17158
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 20 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ You can add the library by inserting the following in your `build.gradle` :
```gradle
repositories {
maven {
name = "Ladysnake Libs"
url = "https://dl.bintray.com/ladysnake/libs"
name = 'Ladysnake Mods'
url = 'https://ladysnake.jfrog.io/artifactory/mods'
content {
includeGroup 'io.github.ladysnake'
includeGroupByRegex 'io\\.github\\.onyxstudios.*'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id 'fabric-loom' version '0.5-SNAPSHOT'
id "net.minecrell.licenser" version "0.4.1"
id 'com.matthewprenger.cursegradle' version '1.4.0'
id "com.jfrog.bintray" version '1.8.4'
id 'com.jfrog.artifactory' version '4.21.0'
id 'org.ajoberstar.grgit' version '3.1.1'
id 'com.github.breadmoirai.github-release' version '2.2.9'
id 'java-library'
Expand Down
39 changes: 22 additions & 17 deletions release.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ task checkGitStatus() {
throw new RuntimeException("Git repository not ready for release (${grgit.status()})")
}
def currentBranch = grgit.branch.current().getName()
if (currentBranch != 'master' && !currentBranch.matches(/\d\.\d{2}/)) {
if (currentBranch != 'main' && !currentBranch.matches(/\d+\.\d+(?>\.\d+)?/)) {
throw new RuntimeException("Need to be on a stable branch to release (currently on ${currentBranch})")
}
grgit.fetch()
Expand Down Expand Up @@ -39,25 +39,30 @@ githubRelease {
}
tasks.githubRelease.dependsOn(checkGitStatus)

bintray {
user = project.findProperty('bintray_user')
key = project.findProperty('bintray_api_key')
publications = ['mavenJava']
publish = true //[Default: false] Whether version should be auto published after an upload
pkg {
repo = 'libs'
name = project.name
userOrg = 'ladysnake'
version {
name = project.version
vcsTag = project.version
released = new Date()
artifactory {
if (project.hasProperty("artifactory_user")) {
contextUrl = "https://ladysnake.jfrog.io/artifactory/"
publish {
repository {
repoKey = "mods"

username = artifactory_user
password = artifactory_api_key
}
defaults {
publications("mavenJava")

publishArtifacts = true
publishPom = true
}
}
} else {
println "Cannot configure artifactory; please define ext.artifactory_user and ext.artifactory_api_key before running artifactoryPublish"
}
}

bintrayUpload.dependsOn(checkGitStatus)
bintrayUpload.dependsOn build
artifactoryPublish.dependsOn(checkGitStatus)
artifactoryPublish.dependsOn build

// configure the maven publication
publishing {
Expand Down Expand Up @@ -156,7 +161,7 @@ curseforge {

tasks.curseforge.dependsOn(checkGitStatus)

task release(dependsOn: [tasks.publish, tasks.githubRelease, tasks.bintrayUpload, tasks.curseforge]) {
task release(dependsOn: [tasks.publish, tasks.githubRelease, tasks.artifactoryPublish, tasks.curseforge]) {
group = 'publishing'
description = 'Releases a new version to Maven, Github and Curseforge'
}

0 comments on commit fd17158

Please sign in to comment.