-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
107 lines (91 loc) · 2.66 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
buildscript {
repositories {
mavenLocal()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.github.jengelman.gradle.plugins:shadow:6.0.0"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:$assetPipelineVersion"
}
}
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'asset-pipeline'
group = 'com.morpheusdata'
sourceCompatibility = "$compatibility"
targetCompatibility = "$compatibility"
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
repositories {
mavenLocal()
mavenCentral()
}
configurations {
provided
}
dependencies {
provided "com.morpheusdata:morpheus-plugin-api:$pluginApiVersion"
provided "org.codehaus.groovy:groovy-all:$groovyVersion"
implementation 'commons-beanutils:commons-beanutils:1.9.3'
implementation "org.slf4j:slf4j-api:$slf4jVersion"
implementation "org.slf4j:slf4j-parent:$slf4jVersion"
implementation 'commons-net:commons-net:3.6'
// Include morpheus-core and it's dependencies
testImplementation "com.morpheusdata:morpheus-plugin-api:$pluginApiVersion"
testImplementation 'io.reactivex.rxjava2:rxjava:2.2.0'
testImplementation 'org.apache.httpcomponents:httpclient:4.5.3'
testImplementation 'org.apache.httpcomponents:httpcore:4.4.5'
testImplementation "org.slf4j:slf4j-parent:$slf4jVersion"
testImplementation "org.codehaus.groovy:groovy-all:$groovyVersion"
testImplementation "com.morpheusdata:morpheus-test-provider:0.13.4-SNAPSHOT"
testImplementation 'net.bytebuddy:byte-buddy:1.9.3'
testImplementation 'org.objenesis:objenesis:2.6'
testImplementation "org.spockframework:spock-core:$spockVersion"
testImplementation 'cglib:cglib-nodep:3.2.12'
}
sourceSets {
main {
compileClasspath += configurations.provided
}
}
jar {
manifest {
attributes(
'Plugin-Class': 'com.morpheusdata.iframeInstanceTab.IframeInstanceTabPlugin',
'Plugin-Version': version,
)
}
}
java {
withSourcesJar()
withJavadocJar()
}
test {
testLogging {
exceptionFormat = 'full'
showStandardStreams = true
}
}
// tasks
tasks.assemble.dependsOn tasks.shadowJar
tasks.register('moveToPluginFolder') {
doLast {
ant.move file: "${buildDir}/libs/${project.name}-${version}-all.jar",
todir: "./plugin"
}
}
tasks.register('removeArtifacts') {
doLast {
ant.delete dir: "./build"
}
}
tasks.register('make') {
dependsOn tasks.shadowJar
dependsOn 'moveToPluginFolder'
dependsOn 'removeArtifacts'
tasks.findByName('moveToPluginFolder').mustRunAfter 'shadowJar'
tasks.findByName('removeArtifacts').mustRunAfter 'moveToPluginFolder'
}