-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
109 lines (91 loc) · 2.96 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
plugins {
id 'com.palantir.docker' version '0.25.0' apply false
id "com.jfrog.artifactory" version '4.15.1'
}
apply plugin: 'application'
apply plugin: 'com.palantir.docker'
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'com.jfrog.artifactory'
ext {
sharedDir = file("${project.rootDir}/shared")
}
group = 'com.exactpro.th2'
version = release_version
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
repositories {
maven {
name 'MavenLocal'
url sharedDir
}
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/'
}
mavenLocal()
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds'
}
}
artifactoryPublish.skip = true
dependencies {
api platform('com.exactpro.th2:bom:3.0.0')
implementation "com.exactpro.th2:common:3.16.3"
implementation "com.exactpro.th2:grpc-common:3.1.2"
implementation "com.exactpro.th2:grpc-act-uiframework-web-demo:3.2.0"
implementation "com.exactpro.th2:grpc-check1:3.1.4"
implementation "com.exactpro.th2:grpc-hand:2.8.0"
implementation "com.exactpro.th2:act-gui-core:2.5.0"
implementation "com.fasterxml.jackson.core:jackson-core"
implementation "com.fasterxml.jackson.core:jackson-databind"
implementation "org.slf4j:slf4j-log4j12"
implementation "org.slf4j:slf4j-api"
testImplementation 'junit:junit:4.12'
}
application {
mainClassName 'com.exactpro.th2.act.ActMain'
}
applicationName = 'service'
distTar {
archiveName "${applicationName}.tar"
}
dockerPrepare {
dependsOn distTar
}
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
)
}
}
artifactory {
publish {
defaults {
// Reference to Gradle publications defined in the build script.
// This is how we tell the Artifactory Plugin which artifacts should be
// published to Artifactory.
publications('mavenJava')
publishArtifacts = true
publishBuildInfo = true
// Properties to be attached to the published artifacts.
publishPom = true
}
}
}
docker {
copySpec.from(tarTree("$buildDir/distributions/${applicationName}.tar"))
}