Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
TEHIK
TEIS
officials-service
Commits
0a4cd176
Commit
0a4cd176
authored
Sep 09, 2019
by
Raigo Ukkivi
Browse files
Use new common build scripts from plugin in service gradle file.
parent
5cd3db1a
Changes
3
Hide whitespace changes
Inline
Side-by-side
build.gradle
View file @
0a4cd176
...
...
@@ -19,6 +19,7 @@ buildscript {
}
}
apply
plugin:
'ee.sm.ti.teis'
allprojects
{
...
...
@@ -42,10 +43,6 @@ allprojects {
group
=
"${theGroup}"
version
=
"${theVersion}"
apply
plugin:
'java'
apply
plugin:
'idea'
apply
plugin:
'jacoco'
sourceCompatibility
=
11
targetCompatibility
=
11
...
...
gradle.properties
View file @
0a4cd176
...
...
@@ -2,9 +2,8 @@ theGroup=ee.sm.ti.teis
theVersion
=
0.1.0-SNAPSHOT
commonsVersion
=
0.12.2-SNAPSHOT
officeApiGatewayVersion
=
0.1.14-SNAPSHOT
pluginVersion
=
0.0.1
0
-SNAPSHOT
pluginVersion
=
0.0.1
3
-SNAPSHOT
mapstructVersion
=
1.3.0.Final
lombokVersion
=
1.18.2
junitVersion
=
5.4.2
querydslVersion
=
4.1.3
service/build.gradle
View file @
0a4cd176
...
...
@@ -2,65 +2,11 @@ description = """officials-service"""
functionalities
{
microservice
database
}
// Test Structure
sourceSets
{
integTest
{
java
{
compileClasspath
+=
main
.
output
runtimeClasspath
+=
main
.
output
}
java
.
srcDir
file
(
'src/integTest/java'
)
resources
.
srcDir
file
(
'src/integTest/resources'
)
}
}
configurations
{
integTestCompile
.
extendsFrom
testCompile
integTestRuntime
.
extendsFrom
testRuntime
developmentOnly
runtimeClasspath
{
extendsFrom
developmentOnly
}
}
task
integTest
(
type:
Test
)
{
useJUnitPlatform
()
testLogging
{
events
"skipped"
,
"failed"
}
description
=
"Run integration tests"
testClassesDirs
=
sourceSets
.
integTest
.
output
.
classesDirs
classpath
=
sourceSets
.
integTest
.
runtimeClasspath
reports
.
junitXml
.
destination
=
file
(
"$buildDir/test-results/integTest"
)
reports
.
html
.
destination
=
file
(
"$buildDir/reports/integTest/test"
)
jacoco
{
append
=
true
destinationFile
=
file
(
"$buildDir/jacoco/test.exec"
)
}
sonarqube
{
properties
{
properties
[
"sonar.tests"
]
+=
sourceSets
.
integTest
.
allSource
.
srcDirs
properties
[
"sonar.junit.reportPaths"
]
+=
file
(
"$buildDir/test-results/integTest"
)
properties
[
"sonar.coverage.jacoco.xmlReportPaths"
]
+=
file
(
"$buildDir/reports/jacoco/integTestReport/integTestReport.xml"
)
}
}
}
task
integTestReport
(
type:
JacocoReport
)
{
executionData
project
.
tasks
.
integTest
sourceDirectories
=
project
.
files
(
project
.
sourceSets
.
integTest
.
allSource
.
srcDirs
)
classDirectories
=
project
.
sourceSets
.
integTest
.
output
reports
{
xml
.
enabled
true
}
}
integTest
.
dependsOn
test
integTestReport
.
dependsOn
integTest
check
.
dependsOn
integTestReport
jar
.
dependsOn
integTest
bootJar
.
dependsOn
integTest
apply
from:
this
.
getClass
().
getClassLoader
().
getResource
(
'teis.integrationTest.gradle'
)
apply
from:
this
.
getClass
().
getClassLoader
().
getResource
(
'teis.microservice.gradle'
)
dependencies
{
// Spring
...
...
@@ -68,38 +14,14 @@ dependencies {
compile
"org.springframework.boot:spring-boot-starter-data-jpa"
compile
"org.springframework.boot:spring-boot-starter-amqp"
compile
'org.springframework.boot:spring-boot-starter-actuator'
// developmentOnly 'org.springframework.boot:spring-boot-devtools'
//compile 'org.springframework.cloud:spring-cloud-starter-kubernetes-config:1.0.1.RELEASE'
// Database
runtime
"org.postgresql:postgresql:42.2.5"
compile
"org.liquibase:liquibase-core"
// BPM
compile
"org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp:3.2.1"
integTestImplementation
"org.junit.jupiter:junit-jupiter:${junitVersion}"
testCompile
(
'org.springframework.boot:spring-boot-starter-test'
)
{
exclude
group:
'junit'
,
module:
'junit'
//by both name and group
}
integTestImplementation
'org.testcontainers:junit-jupiter:1.11.3'
integTestImplementation
'org.testcontainers:postgresql:1.11.3'
}
// Define the main class for the application
mainClassName
=
'ee.sm.ti.teis.officials.OfficialsServiceApp'
jib
{
def
javaRamInit
=
"-XX:InitialRAMPercentage="
+
(
System
.
getenv
(
'JAVA_RAM_PERCENTAGE_INIT'
)
?
System
.
getenv
(
'JAVA_RAM_PERCENTAGE_INIT'
)
:
'50'
)
def
javaRamMax
=
"-XX:MaxRAMPercentage="
+
(
System
.
getenv
(
'JAVA_RAM_PERCENTAGE_MAX'
)
?
System
.
getenv
(
'JAVA_RAM_PERCENTAGE_MAX'
)
:
'75'
)
from
{
image
=
'openjdk:11-jdk-slim'
}
container
{
jvmFlags
=
[
javaRamInit
,
javaRamMax
,
'-XX:+UseContainerSupport'
,
'-Dspring.devtools.restart.enabled=false'
]
}
}
test
{
useJUnitPlatform
()
testLogging
{
events
"passed"
,
"skipped"
,
"failed"
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment