@@ -15,6 +15,28 @@ allprojects {
1515 sourceCompatibility = 17
1616 targetCompatibility = 17
1717
18+ // The file for publication.
19+ def publishFile = layout. buildDirectory. file(" libs/${ project.name} -${ project.version} .jar" )
20+
21+ // publish NMS apis
22+ // this is required because consumers require getting the POM
23+ // files from this project's dependencies, even if they're completely
24+ // shaded and included in this file.
25+ //
26+ // not optimal because this leads to more network calls when downloading
27+ // the api for the first time.
28+ publishing {
29+ publications {
30+ create(' maven' , MavenPublication ) {
31+ groupId = ' com.github.Outspending'
32+ artifactId = project. name
33+
34+ artifact publishFile
35+ from components. java
36+ }
37+ }
38+ }
39+
1840 tasks. withType(JavaCompile ) {
1941 options. encoding = ' UTF-8'
2042 }
@@ -40,23 +62,6 @@ subprojects {
4062 annotationProcessor ' org.projectlombok:lombok:1.18.30'
4163 }
4264
43- // publish NMS apis
44- // this is required because consumers require getting the POM
45- // files from this project's dependencies, even if they're completely
46- // shaded and included in this file.
47- //
48- // not optimal because this leads to more network calls when downloading
49- // the api for the first time.
50- publishing {
51- publications {
52- create(' maven' , MavenPublication ) {
53- groupId = ' com.github.Outspending'
54- artifactId = project. name
55-
56- from components. java
57- }
58- }
59- }
6065}
6166
6267repositories {
@@ -89,21 +94,6 @@ dependencies {
8994
9095}
9196
92- // The file for publication.
93- def buildFile = layout. buildDirectory. file(" libs/BiomesAPI-${ project.version} .jar" )
94-
95- publishing {
96- publications {
97- create(' maven' , MavenPublication ) {
98- groupId = ' com.github.Outspending'
99- artifactId = ' BiomesAPI'
100-
101- artifact buildFile
102- from components. java
103- }
104- }
105- }
106-
10797publishMavenPublicationToMavenLocal {
10898 // Throws an error if we don't explicitly say we're using the output
10999 // of reobfJar in the final build.
0 commit comments