Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 72e6434

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 7032d45 + 9ec87e6 commit 72e6434

5 files changed

Lines changed: 131 additions & 34 deletions

File tree

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Java CI
2+
3+
on:
4+
push:
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v1
10+
- uses: actions/setup-java@v1
11+
with:
12+
java-version: 8
13+
- uses: eskatos/gradle-command-action@v1
14+
with:
15+
arguments: build -x checkstyleMain -x checkLicenses
16+
17+
checkstyle:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v1
21+
- uses: actions/setup-java@v1
22+
with:
23+
java-version: 8
24+
- uses: eskatos/gradle-command-action@v1
25+
with:
26+
arguments: checkstyleMain
27+
28+
license:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v1
32+
- uses: actions/setup-java@v1
33+
with:
34+
java-version: 8
35+
- uses: eskatos/gradle-command-action@v1
36+
with:
37+
arguments: checkLicenses

.github/workflows/publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Publish Release
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
env:
7+
bintray_user: ${{ secrets.bintray_user }}
8+
bintray_key: ${{ secrets.bintray_key }}
9+
10+
jobs:
11+
# bintray:
12+
# runs-on: ubuntu-latest
13+
# steps:
14+
# - uses: actions/checkout@v1
15+
# - uses: actions/setup-java@v1
16+
# with:
17+
# java-version: 8
18+
# - uses: eskatos/gradle-command-action@v1
19+
# with:
20+
# arguments: bintrayUpload
21+
release:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v1
25+
- uses: actions/setup-java@v1
26+
with:
27+
java-version: 8
28+
- uses: eskatos/gradle-command-action@v1
29+
with:
30+
arguments: remapJar
31+
- name: Delete -dev jar
32+
run: rm ./build/libs/patchwork-api-*-dev.jar
33+
- uses: ncipollo/release-action@v1.4.0
34+
with:
35+
artifacts: ./build/libs/patchwork-api-*.jar
36+
token: ${{ secrets.GITHUB_TOKEN }}
37+
bintray:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v1
41+
- uses: actions/setup-java@v1
42+
with:
43+
java-version: 8
44+
- uses: eskatos/gradle-command-action@v1
45+
with:
46+
arguments: bintrayUpload

build.gradle

Lines changed: 42 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ plugins {
66
id 'fabric-loom' version '0.2.6-SNAPSHOT' apply false
77
id 'net.minecrell.licenser' version '0.4.1'
88
id "org.ajoberstar.grgit" version "3.1.1"
9+
id 'com.jfrog.bintray' version '1.8.4'
910
}
1011

1112
def ENV = System.getenv()
1213

1314
class Globals {
14-
static def baseVersion = "0.1.0"
15+
static def baseVersion = "0.1.1"
1516
static def mcVersion = "1.14.4"
1617
static def yarnVersion = "+build.15"
1718
}
@@ -36,7 +37,8 @@ def getBranch() {
3637
if (grgit == null) {
3738
return "unknown"
3839
}
39-
return grgit.branch.current().name
40+
def branch = grgit.branch.current().name
41+
return branch.substring(branch.lastIndexOf("/") + 1)
4042
}
4143

4244
allprojects {
@@ -56,7 +58,7 @@ allprojects {
5658
modCompile "net.fabricmc:fabric-loader:0.7.2+build.174"
5759
modCompile "net.fabricmc.fabric-api:fabric-api:0.4.2+build.246-1.14"
5860

59-
implementation 'com.github.PatchworkMC:EventBus:d5b038e199'
61+
implementation 'com.patchworkmc:patchwork-eventbus:0.1.2:all'
6062
implementation 'com.google.code.findbugs:jsr305:3.0.2'
6163

6264
// For EventBus
@@ -73,7 +75,7 @@ allprojects {
7375
}
7476

7577
repositories {
76-
maven { url 'https://jitpack.io' }
78+
maven { url 'https://dl.bintray.com/patchworkmc/Patchwork-Maven/' }
7779
}
7880

7981
jar {
@@ -133,7 +135,7 @@ subprojects {
133135
afterEvaluate {
134136
from("${project.buildDir}/libs/$archivesBaseName-${version}.jar")
135137
into("${project.buildDir}/libs/")
136-
rename { String fn -> "$archivesBaseName-${version}-maven.jar" }
138+
rename {String fn -> "$archivesBaseName-${version}-maven.jar"}
137139
}
138140
}
139141

@@ -172,7 +174,31 @@ task remapMavenJar(type: net.fabricmc.loom.task.RemapJarTask, dependsOn: jar) {
172174
addNestedDependencies = false
173175
}
174176
}
175-
177+
bintray {
178+
user = project.hasProperty('bintrayUser') ? project.getProperty('bintrayUser') : System.getenv('bintray_user')
179+
key = project.hasProperty('bintrayKey') ? project.getProperty('bintrayKey') : System.getenv('bintray_key')
180+
publish = true
181+
override = true
182+
publications = ['mavenJava']
183+
pkg {
184+
repo = project.bintrayRepo
185+
name = project.name
186+
user = bintray.user
187+
userOrg = project.repoOwner
188+
licenses = [project.codeLicense]
189+
desc = project.description
190+
websiteUrl = "https://github.com/${project.repoOwner}/${project.repoName}"
191+
issueTrackerUrl = "https://github.com/${project.repoOwner}/${project.repoName}/issues"
192+
vcsUrl = "https://github.com/${project.repoOwner}/${project.repoName}.git"
193+
publicDownloadNumbers = true
194+
195+
githubRepo = "${project.repoOwner}/${project.repoName}"
196+
version {
197+
name = project.version
198+
released = new Date()
199+
}
200+
}
201+
}
176202
publishing {
177203
publications {
178204
mavenJava(MavenPublication) {
@@ -194,39 +220,24 @@ publishing {
194220
}
195221
}
196222
}
197-
198-
repositories {
199-
maven {
200-
url "http://mavenupload.modmuss50.me/"
201-
if (project.hasProperty('mavenPass')) {
202-
credentials {
203-
username 'buildslave'
204-
password project.getProperty('mavenPass')
205-
}
206-
}
207-
}
208-
}
209223
}
210224

211225
task licenseFormatAll
212-
subprojects { p -> licenseFormatAll.dependsOn("${p.path}:licenseFormat") }
213-
subprojects.each { remapJar.dependsOn("${it.path}:remapJar") }
214-
226+
subprojects {p -> licenseFormatAll.dependsOn("${p.path}:licenseFormat")}
227+
subprojects.each {remapJar.dependsOn("${it.path}:remapJar")}
215228
repositories {
216229
flatDir {
217230
dirs 'jars'
218231
}
219232
mavenCentral()
220233
}
221-
222234
dependencies {
223235
afterEvaluate {
224236
subprojects.each {
225237
compile project(path: ":${it.name}", configuration: "dev")
226238
include project("${it.name}:")
227239
}
228240
}
229-
230241
implementation 'org.apache.logging.log4j:log4j-core:2.10.0'
231242

232243
minecraft "com.mojang:minecraft:$Globals.mcVersion"
@@ -239,16 +250,16 @@ dependencies {
239250
include 'com.electronwill.night-config:toml:3.6.2'
240251

241252
fileTree(dir: 'jars', include: '*.jar').each {
242-
String baseName = it.name.replace(".jar", "");
243-
String version = "0.1.0";
244-
int split = baseName.lastIndexOf('-');
253+
String baseName = it.name.replace(".jar", "")
254+
String version = "0.1.0"
255+
int split = baseName.lastIndexOf('-')
245256

246257
if (split != -1) {
247-
version = baseName.substring(split + 1);
248-
baseName = baseName.substring(0, split);
258+
version = baseName.substring(split + 1)
259+
baseName = baseName.substring(0, split)
249260
}
250261

251-
String name = "testmod:${baseName}:${version}";
262+
String name = "testmod:${baseName}:${version}"
252263

253264
System.out.println("Found test mod: " + it.name.replace(".jar", "") + " -> " + name)
254265

@@ -257,9 +268,8 @@ dependencies {
257268
}
258269
}
259270

260-
version = Globals.baseVersion + "+" + (ENV.BUILD_NUMBER ? ("build." + ENV.BUILD_NUMBER) : "local") + "-" + getBranch()
271+
version = Globals.baseVersion //+ "+" + (ENV.BUILD_NUMBER ? ("build." + ENV.BUILD_NUMBER) : "local") + "-" + getBranch()
261272

262273
logger.lifecycle("Building Patchwork: " + version)
263274

264-
// This line breaks every second Gradle command
265-
// apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/ideconfig.gradle'
275+
apply from: 'https://github.com/FabricMC/fabric-docs/raw/master/gradle/ideconfig.gradle'

gradle.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
org.gradle.jvmargs=-Xmx2G
2+
repoName=patchwork-api
3+
repoOwner=patchworkmc
4+
bintrayRepo=Patchwork-Maven
5+
codeLicense=LGPL-2.1
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Mon Aug 22 17:36:22 EDT 2016
1+
#Fri Dec 27 13:59:51 CST 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip

0 commit comments

Comments
 (0)