Skip to content

Commit 0a8e86a

Browse files
committed
Added deployment configuration
1 parent f970b62 commit 0a8e86a

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ plugins {
1111

1212
description = 'Generic mapping service supporting different mapping implementations.'
1313
group = 'edu.kit.datamanager'
14-
version = '0.1.0-SNAPSHOT'
1514

1615
println "Running gradle version: $gradle.gradleVersion"
1716
println "Building ${name} version: ${version}"
@@ -28,6 +27,11 @@ configurations {
2827
sourceCompatibility = 1.17
2928
targetCompatibility = 1.17
3029

30+
if (project.hasProperty('release')) {
31+
println 'Using \'release\' profile for building ' + project.getName()
32+
apply from: 'gradle/profile-deploy.gradle'
33+
}
34+
3135
repositories {
3236
mavenLocal()
3337
mavenCentral()
@@ -121,6 +125,9 @@ jar {
121125
manifest {
122126
attributes 'Main-Class': 'edu.kit.datamanager.mapping-service.MappingServiceApplication'
123127
}
128+
archiveBaseName = 'mapping-service'
129+
// version is defined in file 'gradle.properties'
130+
archiveVersion = System.getenv('version')
124131
}
125132

126133
springBoot {

gradle.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
systemProp.jdk.tls.client.protocols="TLSv1,TLSv1.1,TLSv1.2"
2+
3+
version=1.0.0-SNAPSHOT
4+
action.custom-1=allTests
5+
action.custom-1.args=--configure-on-demand -w -x check

gradle/profile-deploy.gradle

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright 2021 Karlsruhe Institute of Technology.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
////////////////////////////////////////////////////////////////////////////////
18+
//for plugin net.researchgate.release
19+
//see https://github.com/researchgate/gradle-release
20+
////////////////////////////////////////////////////////////////////////////////
21+
release {
22+
//define template for tagging, e.g. v1.0.0
23+
tagTemplate = 'v${version}'
24+
//set source file of version property
25+
versionPropertyFile = 'gradle.properties'
26+
//set possible properties which may contain the version
27+
versionProperties = ['version', 'mainversion']
28+
}

0 commit comments

Comments
 (0)