/
build.gradle
116 lines (96 loc) · 2.91 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
110
111
112
113
114
115
116
/*
* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) 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://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.
*
*/
apply from: "$rootDir/gradle/javaProject.gradle"
apply from: "$rootDir/gradle/ballerinaLangLibLoad.gradle"
configurations.all {
resolutionStrategy.preferProjectModules()
}
configurations {
distBal {
transitive false
}
distributionBala
distributionBirJar
balRt
testRt
testCore
}
dependencies {
implementation project(':ballerina-tools-api')
implementation project(':ballerina-parser')
implementation project(':ballerina-lang')
implementation project(':ballerina-lang:annotations')
implementation 'commons-io:commons-io'
implementation "com.google.code.gson:gson:${project.gsonVersion}"
distBal project(path: ':ballerina-lang:annotations', configuration: 'balaImplementation')
testImplementation 'org.testng:testng'
testImplementation 'org.slf4j:slf4j-jdk14'
balRt project(':ballerina-rt')
}
task createTestDistributionCache(type: Copy) {
dependsOn configurations.distributionBala
from configurations.distributionBala
into "$buildDir/repo"
}
task createTestBre(type: Copy) {
from configurations.balRt
from configurations.testRt
from configurations.testCore
from configurations.distributionBirJar
into "$buildDir/bre/lib"
}
test {
dependsOn ':ballerina-lang:build'
dependsOn createTestDistributionCache
dependsOn createTestBre
systemProperty "ballerina.home", "$buildDir"
testLogging {
events "failed"
exceptionFormat "full"
showStackTraces = true
showStandardStreams = true
}
useTestNG() {
suites 'src/test/resources/testng.xml'
}
}
artifacts {
file("$sourceSets.main.output.resourcesDir/doc-ui/")
}
processResources {
include '**/properties'
include 'doc-ui/index.html'
include 'builtin-types-descriptions/'
include 'keywords-descriptions/'
include 'release-description.md'
filter { String line -> line.replace('${short.version}', "${project.version}")}
}
task copyBala(type: Copy) {
from configurations.distBal
into("$buildDir/lib")
}
description = 'Ballerina - Docerina'
ext.moduleName = 'docerina'
compileJava {
inputs.property("moduleName", moduleName)
doFirst {
options.compilerArgs = [
'--module-path', classpath.asPath,
]
classpath = files()
}
}