-
Notifications
You must be signed in to change notification settings - Fork 1
/
grails-plugin-jfrog-publish.gradle
70 lines (62 loc) · 2 KB
/
grails-plugin-jfrog-publish.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
// region Release configuration
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4.21.0"
}
}
apply plugin: 'maven-publish'
// Have to reference the implementation-class as application by plugin id doesn't work in external build script
// check following issue: https://github.com/gradle/gradle/issues/1262
apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin
jar {
exclude "com/wizpanda/UrlMappings**"
}
publishing {
publications {
wpJFrogMaven(MavenPublication) {
groupId = project.group
artifactId = project.name
version = project.version
from components.java
artifact sourcesJar
artifact javadocJar
pom {
name = "${pomName}".toString()
description = "${pomDescription}".toString()
url = "${pomURL}".toString()
developers {
developer {
id = 'sagrawal31'
name = 'Shashank Agrawal'
email = 'creative@wizpanda.com'
}
}
scm {
connection = "scm:git:git://github.com/${pomGitHubSlug}.git".toString()
developerConnection = "scm:git:ssh://github.com:wizpanda/kernel.git".toString()
url = "https://github.com/${pomGitHubSlug}/tree/main".toString()
}
}
}
}
}
artifactory {
contextUrl = "https://wizpanda.jfrog.io/artifactory"
publish {
repository {
repoKey = "default-maven-local"
username = "${wpArtifactoryUsername}".toString()
password = "${wpArtifactoryPassword}".toString()
}
defaults {
publications('wpJFrogMaven')
publishArtifacts = true
}
}
}
// endregion