Skip to content

Commit 69e9abf

Browse files
committed
Test to fix jitpack drunk-ness
1 parent 18ad917 commit 69e9abf

File tree

6 files changed

+39
-21
lines changed

6 files changed

+39
-21
lines changed

build.gradle

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ tasks.register('publishToMavenLocal', Task)
99

1010
subprojects {
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
}

client/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// Client build.gradle
2+
plugins {
3+
id 'maven-publish'
4+
}
5+
26
group 'com.fox2code'
37
version project['foxloader.version']
48

common/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// Common build.gradle
2+
plugins {
3+
id 'maven-publish'
4+
}
5+
26
group 'com.fox2code'
37
version project['foxloader.version']
48

dev/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Dev build.gradle
22
plugins {
33
id 'groovy'
4+
id 'maven-publish'
45
}
56

67
java {

final/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// Final build.gradle
2+
plugins {
3+
id 'maven-publish'
4+
}
5+
26
group 'com.fox2code'
37
version project['foxloader.version']
48

server/build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
// Server build.gradle
2+
plugins {
3+
id 'maven-publish'
4+
}
5+
26
group 'com.fox2code'
37
version project['foxloader.version']
48

0 commit comments

Comments
 (0)