@@ -9,7 +9,6 @@ tasks.register('publishToMavenLocal', Task)
99
1010subprojects {
1111 apply plugin : ' java-library'
12- apply plugin : ' maven-publish'
1312
1413 repositories {
1514 mavenCentral()
@@ -51,26 +50,28 @@ subprojects {
5150 final String reindevVersion = project[' reindev.version' ] as String
5251 final String reindevVersionAllowFrom = project[' reindev.version.allowFrom' ] as String
5352
54- publishing {
55- publications {
56- release(MavenPublication ) {
57- from components. java
58- groupId = " com.github.Fox2Code.FoxLoader"
59- artifactId = project. name
60- version = ' 1.0' // JitPack only work with "1.0" as version
61- pom {
62- url = ' https://github.com/Fox2Code/FoxLoader'
63- if (reindevVersion == reindevVersionAllowFrom) {
64- properties = [
65- " foxloader.version" : project[' foxloader.version' ] as String ,
66- " reindev.version" : reindevVersion,
67- ]
68- } else {
69- properties = [
70- " foxloader.version" : project[' foxloader.version' ] as String ,
71- " reindev.version" : reindevVersion,
72- " reindev.version.allowFrom" : reindevVersionAllowFrom,
73- ]
53+ if (project. pluginManager. hasPlugin(" maven-publish" )) {
54+ publishing {
55+ publications {
56+ release(MavenPublication ) {
57+ from components. java
58+ groupId = " com.github.Fox2Code.FoxLoader"
59+ artifactId = project. name
60+ version = ' 1.0' // JitPack only work with "1.0" as version
61+ pom {
62+ url = ' https://github.com/Fox2Code/FoxLoader'
63+ if (reindevVersion == reindevVersionAllowFrom) {
64+ properties = [
65+ " foxloader.version" : project[' foxloader.version' ] as String ,
66+ " reindev.version" : reindevVersion,
67+ ]
68+ } else {
69+ properties = [
70+ " foxloader.version" : project[' foxloader.version' ] as String ,
71+ " reindev.version" : reindevVersion,
72+ " reindev.version.allowFrom" : reindevVersionAllowFrom,
73+ ]
74+ }
7475 }
7576 }
7677 }
0 commit comments