-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
194 lines (168 loc) · 5.65 KB
/
Copy pathbuild.gradle
File metadata and controls
194 lines (168 loc) · 5.65 KB
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
buildscript {
repositories {
mavenCentral()
jcenter()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "com.gorylenko.gradle-git-properties:gradle-git-properties:2.4.0"
classpath 'de.undercouch:gradle-download-task:3.1.1'
}
}
description = "Ar4k wrapper to Milo Opcua library"
group = 'net.rossonet.opcua.milo'
version = '0.0.1'
ext {
sourceCompatibility = 1.8
ossrhPassword = System.getenv('OSSRH_PASSWORD')
}
repositories {
mavenCentral()
jcenter()
}
apply plugin: 'java'
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: "com.gorylenko.gradle-git-properties"
apply plugin: 'jacoco'
apply plugin: 'base'
apply plugin: 'distribution'
apply plugin: 'signing'
apply plugin: 'maven-publish'
dependencies {
api group: 'org.json', name: 'json', version: '20211205'
api group: 'net.rossonet.commons', name: 'rossonet-helper', version: '0.3.1' // TODO to 0.3.2
// Opc UA Milo https://github.com/eclipse/milo
api group: 'org.eclipse.milo', name: 'sdk-client', version: '0.6.8'
api group: 'org.eclipse.milo', name: 'sdk-server', version: '0.6.8'
api group: 'org.eclipse.milo', name: 'dictionary-manager', version: '0.6.8'
api group: 'org.eclipse.milo', name: 'dictionary-reader', version: '0.6.8'
api group: 'org.eclipse.milo', name: 'bsd-parser-core', version: '0.3.8'
// rules engine
api group: 'org.jeasy', name: 'easy-rules-core', version: '4.1.0'
api group: 'org.jeasy', name: 'easy-rules-mvel', version: '4.1.0'
// api group: 'org.jeasy', name: 'easy-rules-spel', version: '4.1.0'
// api group: 'org.jeasy', name: 'easy-rules-jexl', version: '4.1.0'
// digital twins definition in json-ld
api group: 'com.github.jsonld-java', name: 'jsonld-java', version: '0.13.4'
implementation 'org.slf4j:slf4j-api:2.0.3'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testImplementation group: 'com.ginsberg', name: 'junit5-system-exit', version: '1.1.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
testImplementation 'org.slf4j:slf4j-simple:2.0.3'
}
task eclipseClosedDependencies {}
task eclipseClosedDependencies_ {}
eclipse {
classpath {
downloadJavadoc = true
downloadSources = true
}
}
task view { doLast { println "Working on project ${project.name} [ ${project.description} ]" } }
jar.doLast { task ->
ant.checksum file: task.archivePath
}
java {
withJavadocJar()
withSourcesJar()
}
gitProperties {
failOnNoGitDirectory = false
customProperty 'component', "${project.name}"
dateFormat = "yyyy-MM-dd HH:mm:ssZ"
dateFormatTimeZone = 'GMT'
}
test {
useJUnitPlatform()
}
javadoc{
destinationDir = file("${project.buildDir}/docs/javadoc/${project.name}/")
failOnError=false
}
task theiaIdeBackend(type: Exec) {
workingDir "./"
commandLine 'docker', 'run', '--init', '-p', '3000:3000', '-d', '-v', "${projectDir}:/home/project:cached", 'rossonet/theia-ide:latest'
}
task theiaIdeBackendNoCached(type: Exec) {
workingDir "./"
commandLine 'docker', 'run', '--init', '-p', '3000:3000', '-d', '-v', "${projectDir}:/home/project", 'rossonet/theia-ide:latest'
}
task theiaIdeBackendNoVolume(type: Exec) {
workingDir "./"
commandLine 'docker', 'run', '--init', '-p', '3000:3000', '-d', '--name', "docker-ide-${project.name}", 'rossonet/theia-ide:latest'
}
task theiaIdeBackendCopy(type: Exec) {
theiaIdeBackendCopy.dependsOn("theiaIdeBackendNoVolume")
workingDir "./"
commandLine 'docker', 'cp', '.', "docker-ide-${project.name}:/home/project/"
}
task theiaIdeBackendStart(type: Exec) {
description 'Run Theia IDE container with docker'
theiaIdeBackendStart.dependsOn("theiaIdeBackendCopy")
group "Theia IDE on Docker Container"
workingDir "./"
commandLine 'docker', 'exec', '-u', 'root', "docker-ide-${project.name}", '/bin/chown', '-R', 'theia:theia', '/home/project'
}
task printTheiaIdeBackendDockerCommand(type: Exec) {
workingDir "./"
commandLine 'echo', 'docker', 'run', '--init', '-p', '3000:3000', '-d', '--name', "docker-ide-${project.name}", 'rossonet/theia-ide:latest'
}
task theiaIdeLocalBrowser(type: Exec) {
group "Theia IDE on Docker Container"
description 'Open browser to local Theia IDE'
workingDir "./"
commandLine 'xdg-open', 'http://localhost:3000'
}
publishing {
publications {
mavenJava(MavenPublication){
artifactId = "${project.name}"
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = "${project.name}"
description = "${project.description}"
url = 'https://app.rossonet.net/'
licenses {
license {
name = 'GNU AFFERO GENERAL PUBLIC LICENSE 3.0'
url = 'https://www.gnu.org/licenses/agpl-3.0.html'
}
}
developers {
developer {
id = 'ar4k'
name = 'Andrea Ambrosini'
email = 'andrea.ambrosini@rossonet.org'
}
}
scm {
connection = 'scm:git:git://github.com/rossonet/ar4k-opcua.git'
developerConnection = 'scm:git:ssh://github.com:rossonet/ar4k-opcua.git'
url = 'https://github.com/rossonet/ar4k-opcua/tree/master'
}
}
}
}
repositories {
maven {
url = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
name = "sonatype"
credentials {
username "rossonet"
password "${ossrhPassword}"
}
}
}
}
signing {
sign publishing.publications.mavenJava
}