-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
179 lines (147 loc) · 4.04 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
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
import org.apache.tools.ant.filters.ReplaceTokens
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "com.github.johnrengelman:shadow:8.1.1"
}
}
allprojects {
apply plugin: 'idea'
repositories {
mavenCentral()
}
}
configure(subprojects - project(':jgr-r')) {
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
compileJava {
options.encoding = 'UTF-8'
}
javadoc {
options.addStringOption('encoding', 'UTF-8')
}
task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
archiveClassifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
// archives javadocJar
}
dependencies {
}
}
project(":jgr-java") {
dependencies {
implementation project(":ibase")
implementation project(":javagd")
implementation project(":REngine")
implementation project(":rJava")
implementation 'com.massisframework:orange-extensions:1.3.1'
// compile 'net.sf.jedit-syntax:jedit-syntax:2.2.2'
}
jar {
manifest {
attributes "Implementation-Version": archiveVersion
}
}
shadowJar {
archiveFileName = 'JGR.jar'
dependencies {
exclude(project(':javagd'))
exclude(project(':rJava'))
// exclude(dependency('com.massisframework:orange-extensions:1.3.1'))
// exclude(dependency('net.sf.jedit-syntax:jedit-syntax:2.2.2'))
}
}
jar.finalizedBy shadowJar
}
project(":jgr-r") {
apply plugin: 'base'
def javaDist = 'src/main/JGR/inst/java'
def javaSrc = 'src/main/JGR/java'
clean.doLast {
file('src/main/JGR/DESCRIPTION').delete()
file('src/main/JGR/R').deleteDir()
file(javaDist).deleteDir()
file(javaSrc).deleteDir()
file(javaDist).mkdir()
file(javaSrc).mkdir()
}
task prepareJGR(type: Copy) {
from('src/main/raw')
into('src/main/JGR')
filter(ReplaceTokens, tokens: [VERSION: version, DATE: new Date().format("yyyy-MM-dd"), DATETIME: new Date().format("yyyy-MM-dd HH:mm:SS z")])
}
task copyJGR(type: Copy) {
from file("${project(':jgr-java').buildDir}/libs/JGR.jar")
into javaDist
}
task copyJGRSource(type: Copy) {
from project(':jgr-java').sourceSets.main.java.srcDirs
into javaSrc
}
copyJGR.dependsOn project(":jgr-java").build
copyJGR.dependsOn project(":jgr-java").shadowJar
build.dependsOn prepareJGR, copyJGR, copyJGRSource
}
project(":ibase") {
}
project(":REngine") {
sourceSets {
main {
java {
srcDirs = [projectDir]
exclude '**/Rserve/*', '**/JRI/test/*'
}
}
}
idea {
module {
contentRoot = file(projectDir)
sourceDirs += file(projectDir)
excludeDirs += file('Rserve')
excludeDirs += file('JRI/test')
}
}
println idea.module.sourceDirs
dependencies {
implementation project(":rJava")
}
javadoc.enabled false
sourcesJar.enabled false
}
project(":rJava") {
sourceSets {
main {
java {
srcDirs = ['jri']
exclude '**/bootstrap/**', '**/examples/**', '**/tools/**', '**/REngine/**'
}
}
}
idea {
module {
excludeDirs += file('jri/bootstrap')
excludeDirs += file('jri/examples')
excludeDirs += file('jri/tools')
excludeDirs += file('jri/src')
excludeDirs += file('jri/REngine')
}
}
javadoc.enabled false
sourcesJar.enabled false
}
idea {
targetVersion = '4'
}