forked from springwolf/springwolf-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
116 lines (96 loc) · 2.56 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
plugins {
id 'java'
id 'com.github.node-gradle.node' version '3.5.1'
id 'signing'
id 'maven-publish'
}
def isSnapshot = Boolean.valueOf(project.findProperty('SNAPSHOT'))
group = 'io.github.springwolf'
version = '0.6.0' + (isSnapshot ? '-SNAPSHOT' : '')
sourceCompatibility = '1.8'
node {
version = '18.14.2'
npmVersion = '9.5.0'
download = true
}
npm_run_build {
inputs.files fileTree("src")
inputs.file 'angular.json'
inputs.file 'package.json'
inputs.file 'package-lock.json'
outputs.dir 'build'
}
task buildPages(type: NpmTask) {
args = ['run', 'build_pages']
inputs.files fileTree("src")
inputs.file 'angular.json'
inputs.file 'package.json'
inputs.file 'package-lock.json'
doLast {
copy {
from "./dist/springwolf-ui/asyncapi-ui.html"
into "dist/springwolf-ui"
rename ("asyncapi-ui.html", "index.html")
}
}
}
jar {
dependsOn 'npm_run_build'
metaInf { from 'dist/springwolf-ui' into 'resources/springwolf' }
}
java {
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId 'springwolf-ui'
groupId project.group
version project.version
pom {
name = 'springwolf-ui'
description = 'Web UI for Springwolf'
url = 'https://springwolf.github.io'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id = 'stavshamir'
name = 'Stav Shamir'
email = '[email protected]'
}
developer {
id = 'timonback'
name = 'Timon Back'
email = '[email protected]'
}
}
scm {
url = 'https://github.com/springwolf/springwolf-ui'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
url = isSnapshot ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = project.findProperty('MAVEN_USERNAME') ?: ''
password = project.findProperty('MAVEN_PASSWORD') ?: ''
}
}
}
}
signing {
def signingKey = project.findProperty("SIGNINGKEY")
def signingPassword = project.findProperty("SIGNINGPASSWORD")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}