-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TH2-4954] th2 transport protocol support (#48)
* th2 transport protocol support * alias group equals to session alias * dependencies * [th2-4954] Updated dependencies * dependencies, dev release workflow, README.md --------- Co-authored-by: Oleg Smelov <[email protected]> Co-authored-by: nikita.smirnov <[email protected]>
- Loading branch information
1 parent
dc456d0
commit 70c22d2
Showing
15 changed files
with
309 additions
and
315 deletions.
There are no files selected for viewing
13 changes: 6 additions & 7 deletions
13
.../workflows/dev-release-docker-publish.yml → ...ease-java-publish-sonatype-and-docker.yml
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
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,225 +1,42 @@ | ||
/* | ||
* Copyright 2020-2021 Exactpro (Exactpro Systems Limited) | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
plugins { | ||
id 'java' | ||
id 'java-library' | ||
id 'application' | ||
id 'maven-publish' | ||
id 'signing' | ||
id 'com.palantir.docker' version '0.25.0' | ||
id 'org.jetbrains.kotlin.jvm' version '1.6.21' | ||
id "org.owasp.dependencycheck" version "8.1.2" | ||
id "io.github.gradle-nexus.publish-plugin" version "1.0.0" | ||
|
||
} | ||
|
||
group 'com.exactpro.th2' | ||
version release_version | ||
|
||
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/' | ||
buildscript { | ||
repositories { | ||
gradlePluginPortal() | ||
maven { | ||
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/" | ||
} | ||
} | ||
mavenLocal() | ||
|
||
configurations.all { | ||
resolutionStrategy.cacheChangingModulesFor 0, 'seconds' | ||
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds' | ||
dependencies { | ||
classpath "com.exactpro.th2:th2-gradle-plugin:0.0.1-dev-5915968839-41381e5-SNAPSHOT" | ||
} | ||
} | ||
|
||
apply plugin: "com.exactpro.th2.common-conventions" | ||
apply plugin: "com.exactpro.th2.docker-conventions" | ||
apply plugin: 'kotlin-kapt' | ||
|
||
dependencies { | ||
api platform('com.exactpro.th2:bom:4.2.0') | ||
api 'com.exactpro.th2:common:5.2.0' | ||
api 'com.exactpro.th2:read-file-common-core:2.0.0-th2-4951-5256417699-8614fb0-SNAPSHOT' | ||
api platform("com.exactpro.th2:bom:4.5.0") | ||
implementation "com.exactpro.th2:common:5.4.2-dev" | ||
implementation "com.exactpro.th2:common-utils:2.2.0-dev" | ||
implementation "com.exactpro.th2:read-file-common-core:3.0.0-dev" | ||
|
||
implementation('com.opencsv:opencsv:5.7.0') { | ||
implementation ("com.opencsv:opencsv:5.8") { | ||
because("we need to write a correct CSV in case of free pattern is used") | ||
} | ||
|
||
implementation 'javax.annotation:javax.annotation-api:1.3.2' | ||
implementation "javax.annotation:javax.annotation-api:1.3.2" | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib" | ||
|
||
implementation "org.slf4j:slf4j-api" | ||
|
||
implementation 'com.fasterxml.jackson.core:jackson-databind' | ||
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310' | ||
implementation 'com.fasterxml.jackson.module:jackson-module-kotlin' | ||
|
||
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.0' | ||
testImplementation 'org.mockito:mockito-core:3.6.0' | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
testLogging.showStandardStreams = true | ||
} | ||
|
||
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 | ||
) | ||
} | ||
} | ||
|
||
description = 'DataReaderClient' | ||
sourceCompatibility = JavaVersion.VERSION_11 | ||
applicationName = 'service' | ||
|
||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) { | ||
kotlinOptions { | ||
jvmTarget = "11" | ||
} | ||
} | ||
|
||
distTar { | ||
archiveFileName.set("${applicationName}.tar") | ||
} | ||
|
||
dockerPrepare { | ||
dependsOn distTar | ||
} | ||
|
||
docker { | ||
copySpec.from(tarTree("$buildDir/distributions/${applicationName}.tar")) | ||
} | ||
|
||
application { | ||
mainClass.set("com.exactpro.th2.readlog.Main") | ||
} | ||
|
||
dependencyCheck { | ||
formats=['SARIF'] | ||
} | ||
|
||
dependencyLocking { | ||
lockAllConfigurations() | ||
} | ||
|
||
|
||
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')) | ||
} | ||
} | ||
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 = rootProject.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') | ||
} | ||
} | ||
} | ||
|
||
nexusPublishing { | ||
repositories { | ||
sonatype { | ||
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/")) | ||
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/")) | ||
} | ||
} | ||
} | ||
|
||
|
||
signing { | ||
def signingKey = findProperty("signingKey") | ||
def signingPassword = findProperty("signingPassword") | ||
useInMemoryPgpKeys(signingKey, signingPassword) | ||
sign publishing.publications.mavenJava | ||
implementation "com.fasterxml.jackson.core:jackson-databind" | ||
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" | ||
implementation "com.fasterxml.jackson.module:jackson-module-kotlin" | ||
} | ||
|
||
test { | ||
useJUnitPlatform { | ||
excludeTags('integration-test') | ||
} | ||
testLogging.showStandardStreams = true | ||
} | ||
|
||
tasks.register('integrationTest', Test) { | ||
|
@@ -229,13 +46,6 @@ tasks.register('integrationTest', Test) { | |
} | ||
} | ||
|
||
dependencyCheck { | ||
formats=['SARIF', 'JSON', 'HTML'] | ||
failBuildOnCVSS=5 | ||
|
||
analyzers { | ||
assemblyEnabled = false | ||
nugetconfEnabled = false | ||
nodeEnabled = false | ||
} | ||
dependencyLocking { | ||
lockAllConfigurations() | ||
} |
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,2 +1,4 @@ | ||
release_version=4.0.1 | ||
vcs_url=https://github.com/th2-net/th2-read-log | ||
release_version=4.1.0 | ||
vcs_url=https://github.com/th2-net/th2-read-log | ||
description=DataReaderClient | ||
app_main_class=com.exactpro.th2.readlog.Main |
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
Oops, something went wrong.