-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
118 lines (103 loc) · 3.38 KB
/
build.gradle
File metadata and controls
118 lines (103 loc) · 3.38 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
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
buildscript {
dependencies {
classpath "gradle.plugin.com.xebialabs:gradle-xl-dependency-plugin:3.0.6"
}
}
plugins {
id "com.github.hierynomus.license" version "$licensePluginVersion"
id "java"
id "maven-publish"
id "pl.allegro.tech.build.axion-release" version "$axionReleasePluginVersion"
}
scmVersion {
tag {
prefix = 'v'
}
ignoreUncommittedChanges = true
}
group = 'com.xebialabs.deployit.plugins'
version = scmVersion.version
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
vendor = JvmVendorSpec.ADOPTIUM
}
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
apply plugin: 'com.xebialabs.dependency'
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://packages.atlassian.com/mvn/maven-atlassian-external"
}
["releases"].each { r ->
maven {
credentials {
username nexusUserName
password nexusPassword
}
url "${nexusBaseUrl}/repositories/${r}"
}
}
}
dependencyManagement {
importConf dependency: "com.xebialabs.xl-platform:xl-reference:${xlPlatformVersion}"
importConf rootProject.file('gradle/dependencies.conf')
useJavaPlatform true
}
// Custom configuration to isolate dependencies to be exploded
configurations {
explodeDependency {
canBeResolved = true
canBeConsumed = false
transitive = false
}
implementation.extendsFrom(explodeDependency) // Allow normal usage
}
dependencies {
// Only explode dependency needed which are not bundled with release
explodeDependency("com.atlassian.crowd:crowd-integration-client-rest:$crowdIntegrationVersion")
explodeDependency("com.atlassian.crowd:crowd-integration-client-common:$crowdIntegrationVersion")
explodeDependency("com.atlassian.crowd:crowd-integration-api:$crowdIntegrationVersion")
explodeDependency("com.atlassian.crowd:embedded-crowd-api:$crowdIntegrationVersion")
explodeDependency("com.atlassian.security:atlassian-secure-xml:$crowdSecureXmlVersion")
explodeDependency("org.apache.httpcomponents:httpclient-cache:$httpClient4Version")
// provided dependency with release
implementation("com.google.guava:guava")
implementation("org.slf4j:slf4j-api")
implementation("com.fasterxml.jackson.core:jackson-databind")
implementation("org.springframework.security:spring-security-core")
implementation("org.springframework.security:spring-security-web")
implementation("org.springframework:spring-tx")
implementation("com.xebialabs.deployit:server-core:$xlDeployVersion") {
transitive = false
}
}
// Modify the JAR task to include only exploded classes, excluding META-INF
tasks.jar {
from {
configurations.explodeDependency.collect { zipTree(it).matching { exclude "META-INF/**" } } // Exclude META-INF
}
}
def xlPluginTask = tasks.register('xlPlugin', Zip) {
group = 'Archive'
description = "Create an archive that contains plugin jar and all dependencies defined by 'distBundle' configuration"
dependsOn tasks.jar
archiveExtension.set('xldp')
archiveBaseName.set(project.name)
archiveVersion.set(project.version.toString())
from(jar.archiveFile)
destinationDirectory.set(layout.buildDirectory.dir('distributions'))
}
artifacts {
archives xlPluginTask
}
license {
header = rootProject.file("License.md")
strictCheck = false
exclude "**/*.json"
ext.year = Calendar.getInstance().get(Calendar.YEAR)
ext.name = "DIGITAL.AI"
}