forked from GradleUp/shadow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
90 lines (72 loc) · 2.15 KB
/
build.gradle
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
86
87
88
89
90
import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin
plugins {
id 'groovy'
id 'project-report'
id 'idea'
id 'java-gradle-plugin'
// id 'signing'
id 'com.gradle.plugin-publish' version '1.1.0'
id 'org.ajoberstar.git-publish' version '4.1.1'
id 'com.github.node-gradle.node' version '3.5.1'
}
// Remove the gradleApi so it isn't merged into the jar file.
configurations.named(JavaPlugin.API_CONFIGURATION_NAME) {
dependencies.remove(project.dependencies.gradleApi())
}
apply plugin: ShadowPlugin
apply from: file('gradle/docs.gradle')
apply from: file('gradle/publish.gradle')
apply from: file('gradle/vuepress.gradle')
apply from: file('gradle/ghPages.gradle')
apply from: file('gradle/dependencies.gradle')
repositories {
gradlePluginPortal()
mavenCentral()
}
test {
useJUnitPlatform()
if (System.env.CI == 'true') {
testLogging.showStandardStreams = true
minHeapSize "1g"
maxHeapSize "1g"
}
systemProperty 'java.io.tmpdir', buildDir.absolutePath
}
// jar {
// from rootProject.file('LICENSE')
// from rootProject.file('NOTICE')
// }
// jar.enabled = false
shadowJar {
from rootProject.file('LICENSE')
from rootProject.file('NOTICE')
enableRelocation true
// archiveClassifier = ''
}
idea {
project {
languageLevel = '1.8'
}
}
tasks.named('ideaModule') {
notCompatibleWithConfigurationCache("https://github.com/gradle/gradle/issues/13480")
}
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
tasks.register('downloadDependencies', Exec) {
dependsOn configurations.testRuntimeClasspath
commandLine 'echo', 'Downloaded all dependencies'
}
// tasks.named('build') { dependsOn tasks.named('shadowJar') }
// tasks.withType(JavaCompile).configureEach {
// // This will be the default in Gradle 5.0
// if (!options.compilerArgs.contains("-processor")) {
// options.compilerArgs << '-proc:none'
// }
// }
// tasks.withType(GroovyCompile).configureEach {
// // This will be the default in Gradle 5.0
// if (!options.compilerArgs.contains("-processor")) {
// options.compilerArgs << '-proc:none'
// }
// }