-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.gradle
153 lines (136 loc) · 4.28 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
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 = '1.8'
targetCompatibility = '1.8'
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
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:$plugincore"
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:$plugincore"
testImplementation 'io.reactivex.rxjava3:rxjava:3.1.8'
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 "org.spockframework:spock-core:$spockVersion"
testImplementation 'cglib:cglib-nodep:3.2.12'
}
// https://brokenco.de/2015/07/15/gradle-goodness-excluding-depends-from-shadow.html
configurations {
/* We don't want the morpheus-core dependency in our shadowJar */
// runtime.exclude module: 'morpheus-core'
}
sourceSets {
main {
compileClasspath += configurations.provided
}
}
jar {
manifest {
attributes(
'Plugin-Class': 'com.morpheusdata.infoblox.InfobloxPlugin',
'Plugin-Version': version,
'Morpheus-Name': 'Infoblox',
'Morpheus-Organization': 'morpheus',
'Morpheus-Code': 'infoblox-plugin',
'Morpheus-Description': 'Plugin for Infoblox IPAM/DNS',
'Morpheus-Logo': 'assets/infoblox.svg',
'Morpheus-Logo-Dark': 'assets/infoblox-dark.svg',
'Morpheus-Color': '#ffffff',
'Morpheus-Labels': 'plugin,networking,ipam,dns',
'Morpheus-Repo': 'https://github.com/gomorpheus/morpheus-infoblox-plugin.git',
'Morpheus-Min-Appliance-Version': minversion
)
}
}
java {
withSourcesJar()
withJavadocJar()
}
task copyRuntimeLibs(type: Copy) {
into "lib"
from project.configurations.runtimeClasspath - project.configurations.provided
}
task morpheusJavaDoc(type: Javadoc) {
source = sourceSets.main.allJava
title = "Morpheus Core Docs"
}
task(console, dependsOn: 'classes', type: JavaExec) {
main = 'groovy.ui.Console'
classpath = sourceSets.main.runtimeClasspath
}
publishing {
publications {
maven(MavenPublication) {
artifactId 'morpheus-infoblox-plugin'
pom.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
name 'morpheus-infoblox-plugin'
description 'Morpheus Core provides the core framework for implementing extension plugins for the morpheus platform'
url 'https://github.com/bertramdev/morpheus-infoblox-plugin'
scm {
url 'https://github.com/bertramdev/morpheus-core'
connection 'scm:https://[email protected]/gomorpheus/morpheus-core.git'
developerConnection 'scm:git://github.com/gomorpheus/morpheus-core.git'
}
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/license/LICENSE-2.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'davydotcom'
name 'David Estes'
email '[email protected]'
}
}
}
}
from components.java
}
}
}
test {
testLogging {
exceptionFormat = 'full'
showStandardStreams = true
}
}
tasks.assemble.dependsOn tasks.shadowJar