-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
104 lines (86 loc) · 2.79 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
plugins {
id 'com.google.cloud.artifactregistry.gradle-plugin' version '2.2.0'
id 'maven-publish'
}
repositories {
mavenCentral()
}
apply plugin: 'java-gradle-plugin'
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'java-library'
def build_version = System.getenv('BUILD_NUMBER') == null ? System.currentTimeMillis() : System.getenv('BUILD_NUMBER')
project.version="${software_version}-${build_version}"
group = 'com.exclamationlabs.connid'
dependencies {
api 'org.yaml:snakeyaml:2.2'
api 'org.freemarker:freemarker:2.3.31'
testImplementation 'org.spockframework:spock-core:2.0-groovy-3.0'
testImplementation 'org.codehaus.groovy:groovy-all:3.0.8'
}
tasks.withType(Test) {
useJUnitPlatform()
}
sourceSets {
test {
resources {
srcDirs = ['src/main/resources']
}
}
}
gradlePlugin {
plugins {
simplePlugin {
id = 'com.exclamationlabs.connid.base.config.plugin'
implementationClass = 'com.exclamationlabs.connid.base.config.plugin.ConfigPlugin'
}
}
}
task sourceJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'source'
}
task copyPom(type: Copy) {
from 'build/publications/connector_base/pom-default.xml'
into 'build/libs'
rename ('pom-default.xml', "${project.name}-${project.version}.pom")
}
publishing {
publications {
connector_base_config_plugin(MavenPublication) {
from components.java
artifact sourceJar
pom {
name = "Connector Base: Configuration Generation Plugin"
description = "Configuration Generation Plugin for Base Connector Framework"
url = "https://github.com/ExclamationLabs/connector-base-config-plugin"
licenses {
license {
name = "The Apache License, Version 2.0"
url = "https://www.apache.org/licenses/LICENSE-2.0.txt"
}
}
scm {
url = "https://github.com/ExclamationLabs/connector-base-config-plugin/tree/main"
}
}
}
}
repositories {
maven {
url "artifactregistry://us-east1-maven.pkg.dev/provision-general-operations/provision-public/"
credentials {
username = "${System.getenv('ARTIFACT_REGISTRY_USER')}"
password = "${System.getenv('ARTIFACT_REGISTRY_KEY')}"
}
}
}
}
build.dependsOn(copyPom)
copyPom.dependsOn(publishToMavenLocal)
tasks.withType(PublishToMavenRepository).configureEach {
if (!it.name.equals('publishConnector_base_config_pluginPublicationToMavenRepository')) {
print 'disabling task name: ' + it.name + '\n'
it.enabled = false
}
}