-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #219 from th2-net/separate-executor
MessagesWorker > use separate executor for storeMessageBatch/storeGro…
- Loading branch information
Showing
91 changed files
with
7,678 additions
and
6,365 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,183 +1,175 @@ | ||
plugins { | ||
id "io.github.gradle-nexus.publish-plugin" version"1.0.0" | ||
id "org.owasp.dependencycheck" version "8.2.1" | ||
id 'signing' | ||
id "io.github.gradle-nexus.publish-plugin" version "1.0.0" | ||
id "org.owasp.dependencycheck" version "8.2.1" | ||
id 'signing' | ||
} | ||
|
||
ext { | ||
sharedDir = file("${project.rootDir}/shared") | ||
sharedDir = file("${project.rootDir}/shared") | ||
} | ||
|
||
allprojects { | ||
version = release_version | ||
group = 'com.exactpro.th2' | ||
|
||
dependencyCheck { | ||
formats=['SARIF', 'JSON', 'HTML'] | ||
failBuildOnCVSS=5 | ||
suppressionFile="suppressions.xml" | ||
analyzers { | ||
assemblyEnabled = false | ||
nugetconfEnabled = false | ||
nodeEnabled = false | ||
} | ||
} | ||
version = release_version | ||
group = 'com.exactpro.th2' | ||
|
||
dependencyCheck { | ||
formats = ['SARIF', 'JSON', 'HTML'] | ||
failBuildOnCVSS = 5 | ||
suppressionFile = "${rootDir}/suppressions.xml" | ||
analyzers { | ||
assemblyEnabled = false | ||
nugetconfEnabled = false | ||
nodeEnabled = false | ||
} | ||
} | ||
|
||
} | ||
|
||
subprojects { | ||
apply plugin: 'java-library' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
apply plugin: 'org.owasp.dependencycheck' | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { | ||
name 'Sonatype_snapshots' | ||
url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' | ||
} | ||
|
||
maven { | ||
name 'Sonatype_releases' | ||
url 'https://s01.oss.sonatype.org/content/repositories/releases/' | ||
} | ||
configurations.all { | ||
resolutionStrategy.cacheChangingModulesFor 0, 'seconds' | ||
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds' | ||
} | ||
} | ||
|
||
|
||
defaultTasks 'build' | ||
|
||
sourceCompatibility = JavaVersion.VERSION_11 //Java version compatibility to use when compiling Java source. | ||
targetCompatibility = JavaVersion.VERSION_11 //Java version to generate classes for. | ||
compileJava.options.debugOptions.debugLevel = 'source,lines,vars' // Include debug information | ||
|
||
jar { | ||
manifest { | ||
attributes( | ||
'Created-By': "${System.getProperty('java.version')} (${System.getProperty('java.vendor')})", | ||
'Specification-Title': '', | ||
'Specification-Vendor': 'Exactpro Systems LLC', | ||
'Implementation-Title': project.archivesBaseName, | ||
'Implementation-Vendor': 'Exactpro Systems LLC', | ||
'Implementation-Vendor-Id': 'com.exactpro', | ||
'Implementation-Version': project.version, | ||
'Implementation-Version-Date': getDate() | ||
) | ||
} | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
// conditionals for publications | ||
tasks.withType(PublishToMavenRepository) { | ||
onlyIf { | ||
(repository == publishing.repositories.nexusRepository && | ||
project.hasProperty('nexus_user') && | ||
project.hasProperty('nexus_password') && | ||
project.hasProperty('nexus_url')) || | ||
(repository == publishing.repositories.sonatype && | ||
project.hasProperty('sonatypeUsername') && | ||
project.hasProperty('sonatypePassword')) || | ||
(repository == publishing.repositories.localRepo) | ||
} | ||
} | ||
tasks.withType(Sign) { | ||
onlyIf { project.hasProperty('signingKey') && | ||
project.hasProperty('signingPassword') | ||
} | ||
} | ||
// disable running task 'initializeSonatypeStagingRepository' on a gitlab | ||
tasks.whenTaskAdded {task -> | ||
if(task.name.equals('initializeSonatypeStagingRepository') && | ||
!(project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) | ||
) { | ||
task.enabled = false | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from(components.java) | ||
pom { | ||
name = project.name | ||
packaging = 'jar' | ||
description = rootProject.description | ||
url = vcs_url | ||
scm { | ||
url = vcs_url | ||
} | ||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'developer' | ||
name = 'developer' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
url = vcs_url | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
name = 'localRepo' | ||
url = sharedDir | ||
} | ||
//Nexus repo to publish from gitlab | ||
maven { | ||
name = 'nexusRepository' | ||
credentials { | ||
username = project.findProperty('nexus_user') | ||
password = project.findProperty('nexus_password') | ||
} | ||
url = project.findProperty('nexus_url') | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
def signingKey = findProperty("signingKey") | ||
def signingPassword = findProperty("signingPassword") | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
sign publishing.publications.mavenJava | ||
} | ||
apply plugin: 'java-library' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
apply plugin: 'org.owasp.dependencycheck' | ||
|
||
repositories { | ||
mavenCentral() | ||
maven { | ||
name 'Sonatype_snapshots' | ||
url 'https://s01.oss.sonatype.org/content/repositories/snapshots/' | ||
} | ||
|
||
maven { | ||
name 'Sonatype_releases' | ||
url 'https://s01.oss.sonatype.org/content/repositories/releases/' | ||
} | ||
configurations.configureEach { | ||
resolutionStrategy.cacheChangingModulesFor 0, 'seconds' | ||
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds' | ||
} | ||
} | ||
|
||
|
||
defaultTasks 'build' | ||
|
||
sourceCompatibility = JavaVersion.VERSION_11 //Java version compatibility to use when compiling Java source. | ||
targetCompatibility = JavaVersion.VERSION_11 //Java version to generate classes for. | ||
compileJava.options.debugOptions.debugLevel = 'source,lines,vars' // Include debug information | ||
|
||
jar { | ||
manifest { | ||
attributes( | ||
'Created-By': "${System.getProperty('java.version')} (${System.getProperty('java.vendor')})", | ||
'Specification-Title': '', | ||
'Specification-Vendor': 'Exactpro Systems LLC', | ||
'Implementation-Title': project.archivesBaseName, | ||
'Implementation-Vendor': 'Exactpro Systems LLC', | ||
'Implementation-Vendor-Id': 'com.exactpro', | ||
'Implementation-Version': project.version, | ||
'Implementation-Version-Date': getDate() | ||
) | ||
} | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
// conditionals for publications | ||
tasks.withType(PublishToMavenRepository).configureEach { | ||
onlyIf { | ||
(repository == publishing.repositories.nexusRepository && | ||
project.hasProperty('nexus_user') && | ||
project.hasProperty('nexus_password') && | ||
project.hasProperty('nexus_url')) || | ||
(repository == publishing.repositories.sonatype && | ||
project.hasProperty('sonatypeUsername') && | ||
project.hasProperty('sonatypePassword')) | ||
} | ||
} | ||
tasks.withType(Sign).configureEach { | ||
onlyIf { | ||
project.hasProperty('signingKey') && | ||
project.hasProperty('signingPassword') | ||
} | ||
} | ||
// disable running task 'initializeSonatypeStagingRepository' on a gitlab | ||
tasks.configureEach { task -> | ||
if (task.name == 'initializeSonatypeStagingRepository' && | ||
!(project.hasProperty('sonatypeUsername') && project.hasProperty('sonatypePassword')) | ||
) { | ||
task.enabled = false | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
from(components.java) | ||
pom { | ||
name = project.name | ||
packaging = 'jar' | ||
description = rootProject.description | ||
url = vcs_url | ||
scm { | ||
url = vcs_url | ||
} | ||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = 'developer' | ||
name = 'developer' | ||
email = '[email protected]' | ||
} | ||
} | ||
scm { | ||
url = vcs_url | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
//Nexus repo to publish from gitlab | ||
maven { | ||
name = 'nexusRepository' | ||
credentials { | ||
username = project.findProperty('nexus_user') | ||
password = project.findProperty('nexus_password') | ||
} | ||
url = project.findProperty('nexus_url') | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
String signingKey = findProperty("signingKey") | ||
String signingPassword = findProperty("signingPassword") | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
sign publishing.publications.mavenJava | ||
} | ||
|
||
} | ||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) | ||
} | ||
} | ||
repositories { | ||
sonatype { | ||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) | ||
} | ||
} | ||
} | ||
|
||
tasks.create("listProjects") { | ||
doLast { | ||
subprojects.forEach { println(it.name) } | ||
} | ||
tasks.register("listProjects") { | ||
doLast { | ||
subprojects.forEach { println(it.name) } | ||
} | ||
} | ||
|
||
clean { | ||
delete sharedDir | ||
} | ||
static def getDate() { | ||
def date = new Date() | ||
def formattedDate = date.format('yyyyMMdd-HH:mm:ss.SSS') | ||
return formattedDate | ||
def date = new Date() | ||
def formattedDate = date.format('yyyyMMdd-HH:mm:ss.SSS') | ||
return formattedDate | ||
} |
Oops, something went wrong.