Skip to content

Commit 365e17d

Browse files
Migrated to th2 gradle plugin 0.0.6 (#113)
1 parent e925442 commit 365e17d

File tree

7 files changed

+24
-185
lines changed

7 files changed

+24
-185
lines changed

.github/workflows/build-dev-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ jobs:
1111
createTag: true
1212
docker-username: ${{ github.actor }}
1313
secrets:
14-
docker-password: ${{ secrets.GITHUB_TOKEN }}
14+
docker-password: ${{ secrets.GITHUB_TOKEN }}
15+
nvd-api-key: ${{ secrets.NVD_APIKEY }}

.github/workflows/build-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ jobs:
1111
createTag: true
1212
docker-username: ${{ github.actor }}
1313
secrets:
14-
docker-password: ${{ secrets.GITHUB_TOKEN }}
14+
docker-password: ${{ secrets.GITHUB_TOKEN }}
15+
nvd-api-key: ${{ secrets.NVD_APIKEY }}

.github/workflows/build-sanpshot.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ jobs:
1616
build-target: 'Docker'
1717
docker-username: ${{ github.actor }}
1818
secrets:
19-
docker-password: ${{ secrets.GITHUB_TOKEN }}
19+
docker-password: ${{ secrets.GITHUB_TOKEN }}
20+
nvd-api-key: ${{ secrets.NVD_APIKEY }}

.github/workflows/ci-unwelcome-words.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ jobs:
77
test:
88
runs-on: ubuntu-20.04
99
steps:
10-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v4
1111
with:
1212
ref: ${{ github.sha }}
1313
- name: Checkout tool
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515
with:
1616
repository: exactpro-th2/ci-github-action
1717
ref: master

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Overview (5.5.0)
1+
# Overview (5.6.0)
22

33
Message store (mstore) is an important th2 component responsible for storing raw messages into Cradle. Please refer to [Cradle repository] (https://github.com/th2-net/cradleapi/blob/master/README.md) for more details. This component has a pin for listening messages via MQ.
44

@@ -115,6 +115,14 @@ spec:
115115
This is a list of supported features provided by libraries.
116116
Please see more details about this feature via [link](https://github.com/th2-net/th2-common-j#configuration-formats).
117117
118+
## 5.6.0
119+
120+
* Migrated to th2 gradle plugin `0.0.6`
121+
* Updated bom: `4.6.1`
122+
* Updated common: `5.11.0-dev`
123+
* Updated common-utils: `2.2.3-dev`
124+
* Updated cradle api: `5.3.0-dev`
125+
118126
## 5.5.0
119127

120128
* Updated bom: `4.6.0`

build.gradle

Lines changed: 6 additions & 178 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,12 @@
1-
import com.github.jk1.license.filter.LicenseBundleNormalizer
2-
import com.github.jk1.license.render.JsonReportRenderer
3-
41
plugins {
5-
id 'java'
6-
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
7-
id 'maven-publish'
8-
id 'signing'
9-
id 'java-library'
10-
id 'application'
11-
id 'com.palantir.docker' version '0.25.0'
12-
id "org.owasp.dependencycheck" version "9.0.9"
13-
id 'com.github.jk1.dependency-license-report' version '2.5'
14-
id "de.undercouch.download" version "5.4.0"
2+
id "application"
3+
id "com.exactpro.th2.gradle.component" version "0.0.6"
154
}
165

176
ext {
18-
cradleVersion = '5.2.0-dev'
19-
commonVersion = '5.9.1-dev'
20-
commonUtilsVersion = '2.2.2-dev'
7+
cradleVersion = '5.3.0-dev'
8+
commonVersion = '5.11.0-dev'
9+
commonUtilsVersion = '2.2.0-dev'
2110
}
2211

2312
group = 'com.exactpro.th2'
@@ -46,119 +35,11 @@ repositories {
4635
}
4736
}
4837

49-
java {
50-
withJavadocJar()
51-
withSourcesJar()
52-
}
53-
5438
javadoc {
5539
options.addStringOption('Xdoclint:none', '-quiet')
5640
}
5741

58-
jar {
59-
manifest {
60-
attributes(
61-
'Created-By': "${System.getProperty('java.version')} (${System.getProperty('java.vendor')})",
62-
'Specification-Title': '',
63-
'Specification-Vendor': 'Exactpro Systems LLC',
64-
'Implementation-Title': project.archivesBaseName,
65-
'Implementation-Vendor': 'Exactpro Systems LLC',
66-
'Implementation-Vendor-Id': 'com.exactpro',
67-
'Implementation-Version': project.version
68-
)
69-
}
70-
}
71-
72-
// conditionals for publications
73-
tasks.withType(PublishToMavenRepository).configureEach {
74-
onlyIf {
75-
(repository == publishing.repositories.nexus &&
76-
project.hasProperty('nexus_user') &&
77-
project.hasProperty('nexus_password') &&
78-
project.hasProperty('nexus_url')) ||
79-
(repository == publishing.repositories.sonatype &&
80-
project.hasProperty('sonatypeUsername') &&
81-
project.hasProperty('sonatypePassword'))
82-
}
83-
}
84-
tasks.withType(Sign).configureEach {
85-
onlyIf {
86-
project.hasProperty('signingKey') &&
87-
project.hasProperty('signingPassword')
88-
}
89-
}
90-
// disable running task 'initializeSonatypeStagingRepository' on a gitlab
91-
tasks.configureEach { task ->
92-
if (task.name == 'initializeSonatypeStagingRepository' &&
93-
!(project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword'))
94-
) {
95-
task.enabled = false
96-
}
97-
}
98-
99-
publishing {
100-
publications {
101-
mavenJava(MavenPublication) {
102-
from(components.java)
103-
pom {
104-
name = rootProject.name
105-
packaging = 'jar'
106-
description = rootProject.description
107-
url = vcs_url
108-
scm {
109-
url = vcs_url
110-
}
111-
licenses {
112-
license {
113-
name = 'The Apache License, Version 2.0'
114-
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
115-
}
116-
}
117-
developers {
118-
developer {
119-
id = 'developer'
120-
name = 'developer'
121-
email = 'developer@exactpro.com'
122-
}
123-
}
124-
scm {
125-
url = vcs_url
126-
}
127-
}
128-
}
129-
}
130-
repositories {
131-
//Nexus repo to publish from gitlab
132-
maven {
133-
name = 'nexus'
134-
credentials {
135-
username = project.findProperty('nexus_user')
136-
password = project.findProperty('nexus_password')
137-
}
138-
url = project.findProperty('nexus_url')
139-
}
140-
}
141-
}
142-
143-
nexusPublishing {
144-
repositories {
145-
sonatype {
146-
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
147-
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
148-
}
149-
}
150-
}
151-
152-
signing {
153-
String signingKey = findProperty("signingKey")
154-
String signingPassword = findProperty("signingPassword")
155-
useInMemoryPgpKeys(signingKey, signingPassword)
156-
sign publishing.publications.mavenJava
157-
}
158-
15942
dependencies {
160-
api platform('com.exactpro.th2:bom:4.6.0')
161-
16243
implementation "com.exactpro.th2:common:$commonVersion"
16344
implementation("com.exactpro.th2:common-utils:$commonUtilsVersion") {
16445
because("executor service utils is used")
@@ -196,59 +77,6 @@ application {
19677
mainClassName = 'com.exactpro.th2.mstore.MessageStore'
19778
}
19879

199-
applicationName = 'service'
200-
201-
distTar {
202-
archiveName "${applicationName}.tar"
203-
}
204-
205-
dockerPrepare {
206-
dependsOn distTar
207-
}
208-
209-
docker {
210-
copySpec.from(tarTree("$buildDir/distributions/${applicationName}.tar"))
211-
}
212-
213-
licenseReport {
214-
def licenseNormalizerBundlePath = "$buildDir/license-normalizer-bundle.json"
215-
216-
if (!file(licenseNormalizerBundlePath).exists()) {
217-
download.run {
218-
src 'https://raw.githubusercontent.com/th2-net/.github/main/license-compliance/gradle-license-report/license-normalizer-bundle.json'
219-
dest "$buildDir/license-normalizer-bundle.json"
220-
overwrite false
221-
}
222-
}
223-
224-
filters = [
225-
new LicenseBundleNormalizer(licenseNormalizerBundlePath, false)
226-
]
227-
renderers = [
228-
new JsonReportRenderer('licenses.json', false),
229-
]
230-
excludeOwnGroup = false
231-
allowedLicensesFile = new URL("https://raw.githubusercontent.com/th2-net/.github/main/license-compliance/gradle-license-report/allowed-licenses.json")
232-
}
233-
234-
dependencyLocking {
235-
lockAllConfigurations()
236-
}
237-
23880
dependencyCheck {
239-
formats = ['SARIF', 'JSON', 'HTML']
240-
failBuildOnCVSS = 5
24181
suppressionFile = file('suppressions.xml')
242-
analyzers {
243-
assemblyEnabled = false
244-
nugetconfEnabled = false
245-
nodeEnabled = false
246-
}
247-
}
248-
249-
configurations.configureEach {
250-
resolutionStrategy {
251-
force "com.exactpro.th2:cradle-core:$cradleVersion"
252-
force "com.exactpro.th2:cradle-cassandra:$cradleVersion"
253-
}
254-
}
82+
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
release_version=5.5.0
1+
release_version=5.6.0
22
description='th2 mstore component'
33
vcs_url=https://github.com/th2-net/th2-mstore

0 commit comments

Comments
 (0)