1
1
plugins {
2
- id ' java'
3
2
id ' java-library'
4
3
id ' maven-publish'
5
4
}
6
5
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
13
6
ext. majorVersion = 6
14
- ext. minorVersion = 2
15
- ext. minecraftVersion = " 1.13.2"
16
-
7
+ ext. minorVersion = 4
8
+ ext. minecraftVersion = " 1.14.1"
17
9
sourceCompatibility = 1.8
18
10
targetCompatibility = 1.8
19
11
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 "
27
15
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 "
48
20
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' }
65
29
}
66
30
67
31
dependencies {
@@ -72,41 +36,67 @@ dependencies {
72
36
if (gradle. hasProperty(" useLocalDependencies" ) && gradle. useLocalDependencies) {
73
37
compileOnly project(" :NyaaCore" )
74
38
compileOnly project(" :LanguageUtils" )
39
+ compileOnly project(" :LockettePro" )
75
40
} 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 }
78
44
}
79
45
80
46
// 3rd party plugins
81
47
compileOnly (' net.milkbowl.vault:VaultAPI:1.7' ) { transitive = false }
82
48
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
84
50
85
51
// annotation processor
86
52
compileOnly ' org.librazy:NyaaUtilsLangChecker:2.0-SNAPSHOT'
87
53
annotationProcessor ' org.librazy:NyaaUtilsLangChecker:2.0-SNAPSHOT'
88
54
annotationProcessor " org.spigotmc:spigot-api:$minecraftVersion -R0.1-SNAPSHOT"
89
- api ' javax.persistence:javax.persistence-api:2.2'
90
55
}
91
56
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
+ // }
101
67
68
+
69
+ // publications
102
70
task sourcesJar (type : Jar ) {
103
- classifier = ' sources '
104
- from sourceSets . main . java . srcDirs
71
+ from sourceSets . main . allJava
72
+ archiveClassifier = ' sources '
105
73
}
106
74
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
+ }
110
100
}
111
101
112
102
javadoc {
0 commit comments