-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
130 lines (107 loc) · 4.04 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
plugins {
id 'pl.allegro.tech.build.axion-release' version '1.13.3'
id 'biz.aQute.bnd.builder' version "$bndVersion"
id "com.github.node-gradle.node" version "3.4.0"
id 'groovy'
}
apply plugin: 'java-library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
scmVersion {
tag {
prefix = 'whistlepost-pure-'
}
versionCreator 'versionWithBranch'
branchVersionCreator = ['main': 'simple']
nextVersion {
suffix = 'pre'
separator = '-'
}
}
repositories {
mavenCentral()
mavenLocal()
}
sourceCompatibility = 8
targetCompatibility = 8
dependencies {
implementation "org.codehaus.groovy:groovy-all:$groovyVersion",
'javax.servlet:javax.servlet-api:3.1.0'
implementation 'org.osgi:osgi.core:6.0.0',
'org.osgi:org.osgi.service.component.annotations:1.5.0',
'org.osgi:org.osgi.service.metatype.annotations:1.4.1',
'org.osgi:org.osgi.annotation:6.0.0',
'org.apache.sling:org.apache.sling.commons.osgi:2.4.2'
// keycloak
implementation "org.keycloak:keycloak-servlet-filter-adapter:$keycloakVersion"
// httpclient
implementation 'org.apache.httpcomponents:httpclient-osgi:4.5.13',
"org.apache.sling:org.apache.sling.servlets.annotations:1.2.6",
"org.apache.sling:org.apache.sling.api:$slingApiVersion"
// rewriter
implementation 'org.apache.sling:org.apache.sling.rewriter:1.3.2'
testImplementation "org.codehaus.groovy:groovy:$groovyVersion",
'net.sourceforge.nekohtml:nekohtml:1.9.22',
'org.apache.cocoon:cocoon-serializers-charsets:1.0.2'
testImplementation platform("org.spockframework:spock-bom:2.0-M4-groovy-3.0"),
"org.spockframework:spock-core",
"org.slf4j:slf4j-log4j12:$slf4jVersion",
"org.apache.logging.log4j:log4j:$log4jVersion"
}
java {
withJavadocJar()
withSourcesJar()
}
node {
download = true
}
task buildWebpack(type: NpmTask) {
args = ['run', 'buildWebpack']
}
buildWebpack.dependsOn yarn
clean.dependsOn yarn_cache_clean
build.dependsOn buildWebpack
group = 'org.whistlepost'
description = 'The default Whistlepost rendering theme based on PureCSS'
version = scmVersion.version
ext {
isReleaseVersion = !version.endsWith("SNAPSHOT")
}
publishing {
publications {
"$name"(MavenPublication) {
from components.java
pom.withXml {
asNode().appendNode('name', name)
asNode().appendNode('description', description)
asNode().appendNode('url', 'https://www.whistlepost.org')
def scmNode = asNode().appendNode('scm')
scmNode.appendNode('url', 'https://github.com/whistlepost/whistlepost-pure')
scmNode.appendNode('connection', 'scm:[email protected]:whistlepost/whistlepost-pure.git')
scmNode.appendNode('developerConnection', 'scm:[email protected]:whistlepost/whistlepost-pure.git')
def licenseNode = asNode().appendNode('licenses').appendNode('license')
licenseNode.appendNode('name', 'Apache License')
licenseNode.appendNode('url', 'https://raw.githubusercontent.com/whistlepost/whistlepost-pure/master/LICENSE')
licenseNode.appendNode('distribution', 'repo')
def developerNode = asNode().appendNode('developers').appendNode('developer')
developerNode.appendNode('id', 'fortuna')
developerNode.appendNode('name', 'Ben Fortuna')
}
}
}
repositories {
maven {
name = "OSSRH"
url = version.endsWith('SNAPSHOT') ? "https://oss.sonatype.org/content/repositories/snapshots/" :
"https://oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
signing {
required { isReleaseVersion }
sign publishing.publications[name]
}