This repository was archived by the owner on Sep 1, 2025. It is now read-only.
Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
85 lines (70 loc) · 2.09 KB
/
Copy pathbuild.gradle
File metadata and controls
85 lines (70 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
buildscript {
repositories {
mavenCentral()
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url = "https://plugins.gradle.org/m2/"}
}
dependencies {
classpath 'com.github.jengelman.gradle.plugins:shadow:5.1.0'
classpath 'com.fipsoft.gradle:maven-repo-settings:0.3.2'
}
}
allprojects {
group = pluginGroup
version = pluginVersion
}
subprojects {
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
configurations.all {
resolutionStrategy {
cacheChangingModulesFor 5, 'minutes'
}
}
}
configure(['spigot', 'sponge'].collect { project(":randompackage-$it") }) {
apply plugin: 'java'
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.fipsoft.maven-repo-settings'
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
/*if (JavaVersion.current().isJava11Compatible()) {
// Java 8 turns on doclint which we fail
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}*/
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives jar
archives javadocJar
}
if (!(name.equals('randompackage-sponge'))) {
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}
build.dependsOn(sourcesJar)
}
build.dependsOn(javadocJar)
}
configure(['spigot', 'sponge'].collect { project(":randompackage-$it") }) {
shadowJar {
classifier 'dist'
dependencies {
include(project(":randompackage-libs:${project.name.replace("randompackage-", "")}"))
}
exclude 'GradleStart**'
exclude '.cache'
exclude 'LICENSE*'
}
}