-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
115 lines (97 loc) · 3.6 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
107
108
109
110
111
112
113
114
115
buildscript {
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://nexus.bertramlabs.com/content/repositories/snapshots" }
maven { url "https://nexus.bertramlabs.com/content/repositories/releases" }
maven { url "https://nexus.bertramlabs.com/content/repositories/publicReleases" }
}
dependencies {
classpath "com.github.johnrengelman:shadow:8.1.1"
classpath "com.morpheusdata:morpheus-plugin-gradle:$morpheusGradleVersion"
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:$assetPipelineVersion"
}
}
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'asset-pipeline'
apply plugin: 'com.morpheusdata.morpheus-plugin-gradle'
group = 'com.morpheusdata.azure'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
java {
sourceCompatibility = JavaVersion.toVersion('1.11')
targetCompatibility = JavaVersion.toVersion('1.11')
}
repositories {
mavenLocal()
mavenCentral()
maven { url "https://nexus.bertramlabs.com/content/repositories/snapshots" }
maven { url "https://nexus.bertramlabs.com/content/repositories/releases" }
maven { url "https://nexus.bertramlabs.com/content/repositories/publicReleases" }
}
configurations {
provided
}
dependencies {
provided "com.morpheusdata:morpheus-plugin-api:$morpheusApiVersion"
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 'io.reactivex.rxjava3:rxjava:3.1.7'
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 'net.bytebuddy:byte-buddy:1.9.3'
testImplementation 'org.objenesis:objenesis:2.6'
testImplementation platform("org.spockframework:spock-bom:$spockVersion")
testImplementation "org.spockframework:spock-core"
testImplementation "org.spockframework:spock-junit4" // you can remove this if your code does not rely on old JUnit 4 rules
testImplementation 'cglib:cglib-nodep:3.2.12'
testImplementation "com.morpheusdata:morpheus-plugin-api:$morpheusApiVersion"
}
sourceSets {
main {
compileClasspath += configurations.provided
}
}
//Set plugin metadata information here that gets written into the jar
jar {
manifest {
attributes(
'Plugin-Class': 'com.morpheusdata.azure.AzureBackupPlugin',
'Plugin-Version': version,
'Morpheus-Name': 'Azure Backup',
'Morpheus-Organization': 'morpheus',
'Morpheus-Code': 'azure-backup-plugin',
'Morpheus-Description': 'Plugin for Azure Backups',
'Morpheus-Logo': 'assets/Azure-Backup-Center.svg',
'Morpheus-Logo-Dark': 'assets/Azure-Backup-Center.svg',
'Morpheus-Labels': 'Plugin, Backup',
'Morpheus-Repo': 'https://github.com/gomorpheus/morpheus-azure-backup-plugin',
'Morpheus-Min-Appliance-Version': "7.0.9"
)
}
}
assets {
packagePlugin = false //leave this false for plugins
}
task(console, dependsOn: 'classes', type: JavaExec) {
main = 'groovy.ui.Console'
classpath = sourceSets.main.compileClasspath + sourceSets.main.runtimeClasspath
}
test {
testLogging {
exceptionFormat = 'full'
showStandardStreams = true
}
useJUnitPlatform()
}
tasks.assemble.dependsOn tasks.shadowJar