-
Notifications
You must be signed in to change notification settings - Fork 90
/
build.gradle
83 lines (71 loc) · 2.7 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
/*
* Copyright (c) 2022, WSO2 LLC. (https://www.wso2.com) All Rights Reserved.
*
* 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:https://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 'net.researchgate.release' version '2.8.0'
}
apply from: "$rootDir/../common-gradle-scripts/docker.gradle"
apply from: "$rootDir/../common-gradle-scripts/go.gradle"
release {
tagTemplate = 'common-controller-$version'
git {
requireBranch = project.hasProperty('releaseBranch') ? project.releaseBranch : 'main'
pushToRemote= "origin"
}
}
allprojects {
group = project.group
version = project.version
}
tasks.register('go_test', Exec) {
group 'go'
description 'Automates testing the packages named by the import paths.'
environment "APK_HOME", "$rootDir/../adapter/resources"
environment "APK_ADAPTER_SERVER_PORT", "9401"
environment "APK_Enforcer_JwtGenerator_Enabled", "true"
environment "APK_Analytics_Adapter_bufferSizeBytes", "32768"
environment "APK_Enforcer_JwtIssuer_ValidityPeriod", "1800"
environment "APK_Adapter_Consul_PollInterval", "2"
environment "APK_analytics_enforcer_configProperties_authToken", "test-token"
environment "APK_enforcer_security_tokenService_1_name", "APK-Test"
environment "APK_test_test_stringarray", "foo2, bar2"
environment "APK_test_test_intarray", "1,3"
environment "APK_test_test_floatarray", "1.2,2.4"
environment "APK_test_test_int32array", "4"
environment "APK_test_test_int64array", "21474836479"
environment "APK_test_test_float32val", "1.5"
environment "APK_test_test_float64val", "6.5"
environment "APK_test_test_uintarray", "50"
environment "APK_test_test_uint32array", "100"
environment "APK_test_test_uint64array", "42949672959"
environment "APK_test_test_uintarray2", "-50"
commandLine 'sh', '-c', "go test -race -coverprofile=coverage.out -covermode=atomic ./..."
}
tasks.named('go_revive_run').configure {
finalizedBy go_tidy
finalizedBy go_test
}
tasks.named('go_build').configure {
dependsOn go_revive_run
dependsOn go_vet
println("Running go build")
finalizedBy docker_build
}
task build{
dependsOn go_build
dependsOn docker_build
}
afterReleaseBuild.dependsOn "docker_push"