Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Commit 45c6694

Browse files
committed
update to 1.14.1
1 parent ec60fd3 commit 45c6694

File tree

6 files changed

+65
-174
lines changed

6 files changed

+65
-174
lines changed

.travis.yml

Lines changed: 0 additions & 96 deletions
This file was deleted.

build.gradle

Lines changed: 61 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,31 @@
11
plugins {
2-
id 'java'
32
id 'java-library'
43
id 'maven-publish'
54
}
65

7-
configurations.all {
8-
//resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
9-
}
10-
11-
// Version strings used for CI
12-
// Note the spaces before and after the equals sign
136
ext.majorVersion = 6
14-
ext.minorVersion = 2
15-
ext.minecraftVersion = "1.13.2"
16-
7+
ext.minorVersion = 4
8+
ext.minecraftVersion = "1.14.1"
179
sourceCompatibility = 1.8
1810
targetCompatibility = 1.8
1911

20-
repositories {
21-
jcenter()
22-
// mavenLocal()
23-
maven {
24-
name 'spigot-repo'
25-
url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
26-
}
12+
// Suppiled by Jenkins
13+
ext.buildNumber = System.env.BUILD_NUMBER == null ? "x" : "$System.env.BUILD_NUMBER"
14+
ext.mavenDirectory = System.env.MAVEN_DIR == null ? "$projectDir/repo" : "$System.env.MAVEN_DIR"
2715

28-
maven {
29-
name 'NyaaCentral'
30-
url 'https://raw.githubusercontent.com/NyaaCat/NyaaCentral/maven-repo'
31-
}
32-
33-
maven {
34-
name 'sonatype'
35-
url 'https://oss.sonatype.org/content/groups/public'
36-
}
37-
38-
maven {
39-
name 'EssentialsX'
40-
url 'https://ci.ender.zone/plugin/repository/everything'
41-
}
42-
43-
maven {
44-
name 'vault-repo'
45-
url 'http://nexus.hc.to/content/repositories/pub_releases'
46-
}
47-
}
16+
// Version used for distribution. Different from maven repo
17+
group = "cat.nyaa"
18+
archivesBaseName = "HamsterEcoHelper-mc$minecraftVersion"
19+
version = "$majorVersion.$minorVersion.$buildNumber"
4820

49-
publishing {
50-
publications {
51-
mavenJava(MavenPublication) {
52-
artifact sourcesJar
53-
artifact javadocJar
54-
groupId "cat.nyaa"
55-
artifactId "hamsterecohelper"
56-
version "$majorVersion.$minorVersion-SNAPSHOT"
57-
from components.java
58-
}
59-
}
60-
repositories {
61-
maven {
62-
url "$buildDir/repo"
63-
}
64-
}
21+
repositories {
22+
jcenter()
23+
maven { name 'Spigot'; url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
24+
maven { name 'Sonatype'; url 'https://oss.sonatype.org/content/groups/public' }
25+
maven { name 'sk89q'; url 'http://maven.sk89q.com/artifactory/repo/' }
26+
maven { name 'vault-repo'; url 'http://nexus.hc.to/content/repositories/pub_releases' }
27+
maven { name 'NyaaCat'; url 'https://ci.nyaacat.com/maven/' }
28+
maven { name 'EssentialsX'; url 'https://ci.ender.zone/plugin/repository/everything' }
6529
}
6630

6731
dependencies {
@@ -72,41 +36,67 @@ dependencies {
7236
if (gradle.hasProperty("useLocalDependencies") && gradle.useLocalDependencies) {
7337
compileOnly project(":NyaaCore")
7438
compileOnly project(":LanguageUtils")
39+
compileOnly project(":LockettePro")
7540
} else {
76-
compileOnly('cat.nyaa:nyaacore:6.3-SNAPSHOT') { transitive = false }
77-
compileOnly('cat.nyaa:LangUtils:2.1-SNAPSHOT') { transitive = false }
41+
compileOnly('cat.nyaa:nyaacore:6.4-SNAPSHOT') { transitive = false }
42+
compileOnly('com.meowj:LangUtils:2.2-SNAPSHOT') { transitive = false }
43+
compileOnly('me.crafter.mc:lockettepro:2.9-SNAPSHOT') { transitive = false }
7844
}
7945

8046
// 3rd party plugins
8147
compileOnly ('net.milkbowl.vault:VaultAPI:1.7') { transitive = false }
8248
compileOnly ('net.ess3:EssentialsX:2.16.0') { transitive = false }
83-
compileOnly files('lib/LocketteProAPI.jar')
49+
compileOnly 'javax.persistence:javax.persistence-api:2.2' // NyaaCore shadows this
8450

8551
// annotation processor
8652
compileOnly 'org.librazy:NyaaUtilsLangChecker:2.0-SNAPSHOT'
8753
annotationProcessor 'org.librazy:NyaaUtilsLangChecker:2.0-SNAPSHOT'
8854
annotationProcessor "org.spigotmc:spigot-api:$minecraftVersion-R0.1-SNAPSHOT"
89-
api 'javax.persistence:javax.persistence-api:2.2'
9055
}
9156

92-
compileJava {
93-
// extra config for NyaaCore Language string
94-
String nyaaCoreLangDir = gradle.hasProperty("NyaaCoreLangDirs") ? gradle.NyaaCoreLangDirs : null
95-
if (nyaaCoreLangDir == null) { nyaaCoreLangDir = System.getenv("NYAACORE_LANG_DIR") }
96-
options.compilerArgs += ["-Xplugin:NyaaUtilsLangAnnotationProcessor", "-Xlint:deprecation", "-Xlint:unchecked"]
97-
if (nyaaCoreLangDir != null) {
98-
options.compilerArgs += ["-ALANG_DIR_ADDITIONAL_PATH=" + nyaaCoreLangDir]
99-
}
100-
}
57+
// TODO: langcheck temporarily disabled
58+
// compileJava {
59+
// // extra config for NyaaCore Language string
60+
// String nyaaCoreLangDir = gradle.hasProperty("NyaaCoreLangDirs") ? gradle.NyaaCoreLangDirs : null
61+
// if (nyaaCoreLangDir == null) { nyaaCoreLangDir = System.getenv("NYAACORE_LANG_DIR") }
62+
// options.compilerArgs += ["-Xplugin:NyaaUtilsLangAnnotationProcessor", "-Xlint:deprecation", "-Xlint:unchecked"]
63+
// if (nyaaCoreLangDir != null) {
64+
// options.compilerArgs += ["-ALANG_DIR_ADDITIONAL_PATH=" + nyaaCoreLangDir]
65+
// }
66+
// }
10167

68+
69+
// publications
10270
task sourcesJar(type: Jar) {
103-
classifier = 'sources'
104-
from sourceSets.main.java.srcDirs
71+
from sourceSets.main.allJava
72+
archiveClassifier = 'sources'
10573
}
10674

107-
task javadocJar(type: Jar, dependsOn: javadoc) {
108-
classifier = 'javadoc'
109-
from javadoc.destinationDir
75+
task javadocJar(type: Jar) {
76+
from javadoc
77+
archiveClassifier = 'javadoc'
78+
}
79+
processResources { // modify version string
80+
filesMatching("**/plugin.yml") {
81+
expand 'version': project.version
82+
}
83+
}
84+
publishing {
85+
publications {
86+
mavenJava(MavenPublication) {
87+
artifact sourcesJar
88+
artifact javadocJar
89+
groupId "cat.nyaa"
90+
artifactId "hamsterecohelper"
91+
version "$majorVersion.$minorVersion-SNAPSHOT"
92+
from components.java
93+
}
94+
}
95+
repositories {
96+
maven {
97+
url "${mavenDirectory}"
98+
}
99+
}
110100
}
111101

112102
javadoc {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

lib/LocketteProAPI.jar

-16 KB
Binary file not shown.

src/main/java/cat/nyaa/HamsterEcoHelper/signshop/SignShopManager.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,8 @@ public static boolean isChest(Block block) {
5252
}
5353

5454
public static boolean isSign(Block block) {
55-
if (block != null &&
56-
(block.getType().equals(Material.WALL_SIGN) || block.getType().equals(Material.SIGN))) {
57-
return true;
58-
}
59-
return false;
55+
if (block == null) return false;
56+
return block.getType().name().endsWith("_SIGN"); // FIXME: suspicious comparison
6057
}
6158

6259
public static Block getAttachedBlock(Block block) {

src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: HamsterEcoHelper
22
main: cat.nyaa.HamsterEcoHelper.HamsterEcoHelper
33
description: "Provides a offer/buy system and global market."
4-
version: 6.2-dev
4+
version: ${version}
55
depend: [Vault,NyaaCore,LangUtils]
66
softdepend: [Essentials,LockettePro]
77
authors: [cyilin, RecursiveG]

0 commit comments

Comments
 (0)