Project

Profile

Help

How to connect?
Download (19.7 KB) Statistics
| Branch: | Revision:

he / build-c.gradle @ 2699858e

1
// Find Excelsior Jet to build the Saxon/C releases
2
def excelsiorJetHome = null
3
["${excelsiorJet}",
4
 "/opt/jet15.3-ent-amd64",
5
 "/usr/local/jet15.3-ent-amd64",
6
 "c:/jet15.3-ent-amd64"].each { jet ->
7
  if (excelsiorJetHome == null && pathExists(jet)) {
8
    excelsiorJetHome = jet
9
  }
10
}
11

    
12
task test_jetHome(
13
  description: "Test that excelsiorJetHome is configured"
14
) {
15
  doLast {
16
    if (excelsiorJetHome == null) {
17
      throw new GradleException("Cannot build Saxon/C, excelsiorJetHome undefined")
18
    }
19
  }
20
}
21

    
22
["h", "p", "e"].each { initial ->
23
  def release = initial + "e"
24
  def Release = initial.toUpperCase() + "e"
25
  def RELEASE = release.toUpperCase()
26

    
27
  task "${release}c_copyJet"(
28
    type: Copy,
29
    dependsOn: ["${release}c_jar"],
30
    description: "Copy the JET project file for ${RELEASE}"
31
  ) {
32
    from "${projectDir}/src/jet/libsaxon${release}c.prj"
33
    into "${buildDir}/jet"
34
  }
35

    
36
  task "${release}c_setupJet"(
37
    dependsOn: ["${release}c_copyJet"],
38
    description: "Create JET libsaxon${release}c.jprof for ${RELEASE}"
39
  ) {
40
    outputs.file("${buildDir}/jet/libsaxon${release}c.jprof")
41
    doLast {
42
      new File("${buildDir}/jet/libsaxon${release}c.jprof")
43
        .withWriter("utf-8") { writer ->
44
          writer.write("")
45
        }
46
    }
47
  }
48

    
49
  task "${release}c_copyLibs"(
50
    type: Copy,
51
    description: "Copy library jar files into JET build directory"
52
  ) {
53
    into "${buildDir}/c/jars/${release}c"
54
    from "${resolverJar}"
55
    from "${mailJar}"
56
  }
57

    
58
  task "${release}c_jet"(
59
    type: Exec,
60
    dependsOn: ["${release}c_setupJet", "${release}c_copyLibs", "test_jetHome"],
61
    description: "Run JET on ${RELEASE}"
62
  ) {
63
    inputs.file("${buildDir}/jet/libsaxon${release}c.prj")
64
    inputs.file("${buildDir}/jet/libsaxon${release}c.jprof")
65
    inputs.files("${buildDir}/c/jars/${release}c")
66
    outputs.file("${buildDir}/c/${release}c/libsaxon${release}c.so")
67
    workingDir = "${buildDir}/jet"
68
    commandLine "${excelsiorJetHome}/bin/jc",
69
      "=p", "libsaxon${release}c"
70
    /*
71
    commandLine "docker", "run",
72
      "-e", "PROJECT=libsaxon${release}c",
73
      "-v", "${projectDir}:/saxonica",
74
      "${dockerBuildContainer}:latest"
75
    */
76
  }
77

    
78
  if (systemOs.isWindows()) {
79
    task "${release}c_copyAncillary"(
80
      type: Copy,
81
      description: "Copy ancillary C files into the ${RELEASE} release build directory"
82
    ) {
83
      into "${buildDir}/c/${release}c"
84

    
85
      from("${projectDir}/src/main/c") {
86
        include "Saxon.C.API/**/*"
87
        include "samples/**/*"
88
        exclude "samples/cppTests/build*"
89
        exclude "samples/cTests/build*"
90
        exclude "samples/data/config_file.xml"
91
        exclude "samples/data/package*"
92
        include "saxon-data/**/*"
93
      }
94
      from("${projectDir}/src/docs") {
95
        include "notices/JAMESCLARK.txt"
96
        include "notices/UNICODE.txt"
97
        include "notices/CERN.txt"
98
        include "notices/LICENSE.txt"
99
        include "notices/THAI.txt"
100
      }
101
      from("${projectDir}/src/main/c") {
102
        include "command/*.c"
103
        include "command/jni/**/*"
104
        include "command/build${release}c-command.sh"
105
      }
106
    }
107

    
108
    task "${release}cRelease"(
109
      type: Exec,
110
      dependsOn: ["${release}c_jet", "${release}c_copyAncillary"],
111
      description: "Make the ${RELEASE} release for Saxon/C"
112
    ) {
113
      commandLine "${excelsiorJetHome}/bin/xpack",
114
        "-backend", "excelsior-installer",
115
        "-source", "${buildDir}/c/${release}c",
116
        "-target", "${buildDir}/releases/libsaxon-${RELEASE}C"
117
    }
118
  } else if (systemOs.isMacOsX()) {
119
    task "${release}c_copyAncillary"(
120
      type: Copy,
121
      description: "Copy ancillary C files into the ${RELEASE} release build directory"
122
    ) {
123
      into "${buildDir}/c/${release}c"
124

    
125
      from("${projectDir}/src/main/c") {
126
        include "Saxon.C.API/**/*"
127
        exclude "Saxon.C.API/HEC/**"
128
        exclude "Saxon.C.API/PEC/**"
129
        exclude "Saxon.C.API/EEC/**"
130
        exclude "Saxon.C.API/Makefile"
131
        exclude "Saxon.C.API/PHP7-Build/config.m4"
132
        exclude "Saxon.C.API/Query.c"
133
        exclude "Saxon.C.API/SaxonApiException.cpp"
134
        exclude "Saxon.C.API/SaxonApiException.h"
135
        exclude "Saxon.C.API/XdmArray.h"
136
        exclude "Saxon.C.API/XdmFunctionItem.cpp"
137
        exclude "Saxon.C.API/XdmFunctionItem.h"
138
        exclude "Saxon.C.API/XsltExecutable.cpp"
139
        exclude "Saxon.C.API/XsltExecutable.h"
140
        exclude "Saxon.C.API/config.h"
141
        exclude "Saxon.C.API/config.w32"
142
        exclude "Saxon.C.API/dllmain.cpp"
143
        exclude "Saxon.C.API/readme.txt"
144
        exclude "Saxon.C.API/targetver.h"
145

    
146
        include "samples/**/*"
147
        exclude "samples/cppTests/build*"
148
        include "samples/cppTests/build64-mac.sh"
149
        exclude "samples/cppTests/build32-linux.sh"
150
        exclude "samples/cppTests/build64-linux.sh"
151
        exclude "samples/cppTests/buildCPPSaxonEE.bat"
152
        exclude "samples/cppTests/buildCPPSaxonHE.bat"
153
        exclude "samples/cppTests/buildCPPSaxonPE.bat"
154
        exclude "samples/cppTests/buildpec.sh"
155
        exclude "samples/cTests/build-linux.sh"
156
        exclude "samples/cTests/build.sh"
157
        exclude "samples/cTests/build64-linux.sh"
158
        exclude "samples/cTests/buildhec.sh"
159
        exclude "samples/cTests/buildpec.sh"
160

    
161
        exclude "samples/data/config_file.xml"
162
        exclude "samples/data/package*"
163
        include "saxon-data/**/*"
164
      }
165
      from("${projectDir}/src/docs") {
166
        include "notices/JAMESCLARK.txt"
167
        include "notices/UNICODE.txt"
168
        include "notices/CERN.txt"
169
        include "notices/LICENSE.txt"
170
        include "notices/THAI.txt"
171
      }
172
      from("${projectDir}/src/main/c") {
173
        include "command/*.c"
174
        include "command/jni/**/*"
175
        include "command/build${release}c-command.sh"
176
      }
177
    }
178

    
179
    task "${release}c_releaseSetup"(
180
      type: Exec,
181
      dependsOn: ["${release}c_jet", "${release}c_copyAncillary"],
182
      description: "Make the ${RELEASE} release package for Saxon/C"
183
    ) {
184
      commandLine "${excelsiorJetHome}/bin/xpack",
185
        "-source", "${buildDir}/c/${release}c",
186
        "-target", "${buildDir}/releases/libsaxon-${RELEASE}C"
187
    }
188

    
189
    task "${release}cRelease"(
190
      type: Zip,
191
      dependsOn: ["${release}c_releaseSetup"],
192
      description: "Make the ${RELEASE} release ZIP file for Saxon/C"
193
    ) {
194
      from("${buildDir}/releases/libsaxon-${RELEASE}C")
195
      archiveFileName = "libsaxon-${RELEASE}C-mac-setup-v${saxonCversion}.zip"
196
    }
197
  } else {
198
    task "${release}c_copyAncillary"(
199
      type: Copy,
200
      description: "Copy ancillary C files into the ${RELEASE} release build directory"
201
    ) {
202
      into "${buildDir}/c/${release}c"
203

    
204
      from("${projectDir}/src/main/c") {
205
        include "Saxon.C.API/**/*"
206
        exclude "Saxon.C.API/HEC/**"
207
        exclude "Saxon.C.API/PEC/**"
208
        exclude "Saxon.C.API/EEC/**"
209
        exclude "Saxon.C.API/Makefile"
210
        exclude "Saxon.C.API/PHP7-Build/config.m4"
211
        exclude "Saxon.C.API/Query.c"
212
        exclude "Saxon.C.API/SaxonApiException.cpp"
213
        exclude "Saxon.C.API/SaxonApiException.h"
214
        exclude "Saxon.C.API/XdmArray.h"
215
        exclude "Saxon.C.API/XdmFunctionItem.cpp"
216
        exclude "Saxon.C.API/XdmFunctionItem.h"
217
        exclude "Saxon.C.API/XsltExecutable.cpp"
218
        exclude "Saxon.C.API/XsltExecutable.h"
219
        exclude "Saxon.C.API/config.h"
220
        exclude "Saxon.C.API/config.w32"
221
        exclude "Saxon.C.API/dllmain.cpp"
222
        exclude "Saxon.C.API/readme.txt"
223
        exclude "Saxon.C.API/targetver.h"
224

    
225
        include "samples/**/*"
226
        exclude "samples/cppTests/build*"
227
        include "samples/cppTests/build64-mac.sh"
228
        exclude "samples/cppTests/build32-linux.sh"
229
        exclude "samples/cppTests/build64-linux.sh"
230
        exclude "samples/cppTests/buildCPPSaxonEE.bat"
231
        exclude "samples/cppTests/buildCPPSaxonHE.bat"
232
        exclude "samples/cppTests/buildCPPSaxonPE.bat"
233
        exclude "samples/cppTests/buildpec.sh"
234
        exclude "samples/cTests/build-linux.sh"
235
        exclude "samples/cTests/build.sh"
236
        exclude "samples/cTests/build64-linux.sh"
237
        exclude "samples/cTests/buildhec.sh"
238
        exclude "samples/cTests/buildpec.sh"
239

    
240
        exclude "samples/data/config_file.xml"
241
        exclude "samples/data/package*"
242
        include "saxon-data/**/*"
243
      }
244
      from("${projectDir}/src/docs") {
245
        include "notices/JAMESCLARK.txt"
246
        include "notices/UNICODE.txt"
247
        include "notices/CERN.txt"
248
        include "notices/LICENSE.txt"
249
        include "notices/THAI.txt"
250
      }
251
      from("${projectDir}/src/main/c") {
252
        include "command/*.c"
253
        include "command/jni/**/*"
254
        include "command/build${release}c-command.sh"
255
      }
256
    }
257

    
258
    task "${release}c_releaseSetup"(
259
      type: Exec,
260
      dependsOn: ["${release}c_jet", "${release}c_copyAncillary"],
261
      description: "Make the ${RELEASE} release package for Saxon/C"
262
    ) {
263
      commandLine "${excelsiorJetHome}/bin/xpack",
264
        "-source", "${buildDir}/c/${release}c",
265
        "-target", "${buildDir}/releases/libsaxon-${RELEASE}C"
266
    }
267

    
268
    task "${release}cRelease"(
269
      type: Zip,
270
      dependsOn: ["${release}c_releaseSetup"],
271
      description: "Make the ${RELEASE} release ZIP file for Saxon/C"
272
    ) {
273
      from ("${buildDir}/releases/libsaxon-${RELEASE}C") {
274
        include "**/*"
275
      }
276
      archiveFileName = "libsaxon-${RELEASE}C-setup64-v${saxonCversion}.zip"
277
    }
278
  }
279
}
280

    
281
task hec_featureKeys(
282
  type: JavaExec,
283
  description: "Construct the feature keys for HE"
284
) {
285
  inputs.files fileTree(dir: "${projectDir}/tools/featureKeys")
286
  outputs.file "${projectDir}/src/main/csharp/api/Saxon.Api/Feature.cs"
287
  outputs.file "${projectDir}/src/main/csharp/api/Saxon.Api/FeatureKeys.cs"
288
  classpath = configurations.preprocessor
289
  main = "net.sf.saxon.Transform"
290
  args "${projectDir}/tools/featureKeys/FeatureKeys.xml",
291
    "-xsl:${projectDir}/tools/featureKeys/FeatureKeysToCSharp.xsl",
292
    "-o:${projectDir}/src/main/csharp/api/Saxon.Api/establish-an-output-base-uri"
293
}
294

    
295
task hec_setupPreprocess(
296
  type: Copy,
297
  dependsOn: ["hec_featureKeys"],
298
  description: "Copy HE sources for preprocessing HE"
299
) {
300
  into "${buildDir}/filtered/hec"
301
  from("${projectDir}/src/main/java") {
302
    include "net/sf/saxon/**/*.java"
303
    include "net/sf/saxon/data/**"
304
    exclude "javax/xml/xquery/*.java"
305
    exclude "**/dotnet/**"
306
    include "net/sf/saxon/**/package.html"
307
    include "net/sf/saxon/data/**"
308
    exclude "net/sf/saxon/testdriver/**"
309
    exclude "net/sf/saxon/option/axiom/**"
310
    exclude "net/sf/saxon/option/dom4j/**"
311
    exclude "net/sf/saxon/option/jdom/**"
312
    exclude "net/sf/saxon/option/jdom2/**"
313
    exclude "net/sf/saxon/option/xom/**"
314
    exclude "net/sf/saxon/option/sql/**"
315
  }
316
}
317

    
318
task pec_setupPreprocess(
319
  type: Copy,
320
  description: "Copy PE sources for preprocessing PE"
321
) {
322
  into "${buildDir}/filtered/pec"
323
  from("${projectDir}/src/main/java") {
324
    include "net/sf/saxon/**/*.java"
325
    include "javax/xml/xquery/*.java"
326
    include "net/sf/saxon/data/**"
327
    exclude "**/dotnet/**"
328
    include "net/sf/saxon/**/package.html"
329
    exclude "net/sf/saxon/testdriver/**"
330
    exclude "net/sf/saxon/option/axiom/**"
331
    exclude "net/sf/saxon/option/dom4j/**"
332
    exclude "net/sf/saxon/option/jdom/**"
333
    exclude "net/sf/saxon/option/jdom2/**"
334
    exclude "net/sf/saxon/option/xom/**"
335
    exclude "net/sf/saxon/option/sql/**"
336
    include "com/saxonica/**/*.java"
337
    exclude "com/saxonica/testdriver/**"
338
    exclude "com/saxonica/testdriver/ee/**/*.java"
339
    exclude "com/saxonica/testdriver/old/**/*.java"
340
    exclude "com/saxonica/ee/**"
341
    exclude "com/saxonica/config/EnterpriseConfiguration.java"
342
    exclude "com/saxonica/expr/CastToUnion.java"
343
    exclude "com/saxonica/expr/CastableToUnion.java"
344
    exclude "com/saxonica/expr/DotNetExtensionFunctionCall.java"
345
    exclude "com/saxonica/config/ee/**"
346
    exclude "com/saxonica/js/**"
347
    exclude "com/saxonica/config/DotNetExtensionLibrary.java"
348
    exclude "com/saxonica/config/DotNetExtensionFunctionFactory.java"
349
    exclude "com/saxonica/config/DotNetPlatformPE.java"
350
    exclude "com/saxonica/config/JavaPlatformPE.java"
351
    exclude "com/saxonica/config/JavaPlatformEE.java"
352
    exclude "com/saxonica/Validate.java"
353
    exclude "com/saxonica/config/EnterpriseTransformerFactory.java"
354
    exclude "com/saxonica/config/StreamingTransformerFactory.java"
355
    exclude "com/saxonica/config/EnterpriseXPathFactory.java"
356
    exclude "com/saxonica/config/DynamicLoaderEE.java"
357
    exclude "com/saxonica/config/StandardSchemaResolver.java"
358
    exclude "com/saxonica/jaxp/SchemaFactoryImpl11.java"
359
  }
360
}
361

    
362
task eec_setupPreprocess(
363
  type: Copy,
364
  description: "Copy EE sources for preprocessing EE"
365
) {
366
  into "${buildDir}/filtered/eec"
367
  from("${projectDir}/src/main/java") {
368
    include "net/sf/saxon/**/*.java"
369
    include "javax/xml/xquery/*.java"
370
    include "net/sf/saxon/data/**"
371
    exclude "**/dotnet/**"
372
    include "net/sf/saxon/**/package.html"
373
    exclude "net/sf/saxon/testdriver/**"
374
    exclude "net/sf/saxon/option/axiom/**"
375
    exclude "net/sf/saxon/option/dom4j/**"
376
    exclude "net/sf/saxon/option/jdom/**"
377
    exclude "net/sf/saxon/option/jdom2/**"
378
    exclude "net/sf/saxon/option/xom/**"
379
    exclude "net/sf/saxon/option/sql/**"
380
    include "com/saxonica/**/*.java"
381
    exclude "com/saxonica/testdriver/**/*.java"
382
    exclude "com/saxonica/js/**"
383
    exclude "com/saxonica/ee/bytecode/**"
384
    exclude "com/saxonica/config/DotNetExtensionFunctionFactory.java"
385
    exclude "com/saxonica/config/DotNetExtensionLibrary.java"
386
    exclude "com/saxonica/config/DotNetPlatformPE.java"
387
    exclude "com/saxonica/config/JavaPlatformPE.java"
388
    exclude "com/saxonica/config/JavaPlatformEE.java"
389
    exclude "com/saxonica/expr/DotNetExtensionFunctionCall.java"
390
    include "com/saxonica/**/package.html"
391
  }
392
}
393

    
394
task hec_preprocess(
395
  type: JavaExec,
396
  dependsOn: ["hec_setupPreprocess"],
397
  description: "Preprocess HE sources"
398
) {
399
  inputs.files fileTree(dir: "${buildDir}/filtered/hec")
400
  outputs.files fileTree(dir: "${buildDir}/preprocess/hec")
401
  classpath = configurations.preprocessor
402
  main = "com.igormaznitsa.jcp.JcpPreprocessor"
403
  args "/c",
404
    "/i:${buildDir}/filtered/hec", "/o:${buildDir}/preprocess/hec",
405
    "/p:EE=false", "/p:PE=false", "/p:DOTNET=false",
406
    "/p:SAXONC=true", "/p:BYTECODE=false", "/p:OPT=false"
407
  doFirst {
408
    mkdir "${buildDir}/preprocess/hec"
409
  }
410
}
411

    
412
task pec_preprocess(
413
  type: JavaExec,
414
  dependsOn: ["pec_setupPreprocess"],
415
  description: "Preprocess PE sources"
416
) {
417
  inputs.files fileTree(dir: "${buildDir}/filtered/pec")
418
  outputs.files fileTree(dir: "${buildDir}/preprocess/pec")
419
  classpath = configurations.preprocessor
420
  main = "com.igormaznitsa.jcp.JcpPreprocessor"
421
  args "/c",
422
    "/i:${buildDir}/filtered/pec", "/o:${buildDir}/preprocess/pec",
423
    "/p:EE=false", "/p:PE=true", "/p:DOTNET=false",
424
    "/p:SAXONC=true", "/p:BYTECODE=false", "/p:OPT=false",
425
    "/p:HOF=true"
426
  doFirst {
427
    mkdir "${buildDir}/preprocess/pec"
428
  }
429
}
430

    
431
task eec_preprocess(
432
  type: JavaExec,
433
  dependsOn: ["eec_setupPreprocess"],
434
  description: "Preprocess EE sources"
435
) {
436
  inputs.files fileTree(dir: "${buildDir}/filtered/eec")
437
  outputs.files fileTree(dir: "${buildDir}/preprocess/eec")
438
  classpath = configurations.preprocessor
439
  main = "com.igormaznitsa.jcp.JcpPreprocessor"
440
  args "/c",
441
    "/i:${buildDir}/filtered/eec", "/o:${buildDir}/preprocess/eec",
442
    "/p:EE=true", "/p:PE=false", "/p:DOTNET=false",
443
    "/p:SAXONC=true", "/p:BYTECODE=false", "/p:HOF=true",
444
    "/p:STREAM=true", "/p:SCHEMA=true", "/p:PACKAGES=true",
445
    "/p:OPT=false"
446
  doFirst {
447
    mkdir "${buildDir}/preprocess/eec"
448
  }
449
}
450

    
451
task hec_sources(
452
  type: Copy,
453
  dependsOn: ["hec_preprocess"],
454
  description: "Collect the preprocessed HE sources for compilation"
455
) {
456
  from "${buildDir}/preprocess/hec"
457
  into "${buildDir}/src/hec"
458
  filter { line ->
459
    line.contains("import com.saxonica")
460
      ? null
461
      : line
462
  }
463
}
464

    
465
task pec_sources(
466
  type: Copy,
467
  dependsOn: ["pec_preprocess"],
468
  description: "Collect the preprocessed PE sources for compilation"
469
) {
470
  from "${buildDir}/preprocess/pec"
471
  into "${buildDir}/src/pec"
472
  filter { line ->
473
    if (line.contains("import com.saxonica.ee")
474
        || line.contains("import com.saxonica.config.ee")
475
        || line.contains("net.sf.saxon.dotnet")) {
476
      null
477
    } else {
478
      line
479
    }
480
  }
481
}
482

    
483
task eec_sources(
484
  type: Copy,
485
  dependsOn: ["eec_preprocess"],
486
  description: "Collect the preprocessed EE sources for compilation"
487
) {
488
  from "${buildDir}/preprocess/eec"
489
  into "${buildDir}/src/eec"
490
  filter { line ->
491
    line.contains("import com.saxonica.ee.bytecode")
492
      ? null
493
      : line
494
  }
495
}
496

    
497
task hecCompile(
498
  type: JavaCompile,
499
  dependsOn: ["hec_sources"],
500
  description: "Compile HE for C"
501
) {
502
  classpath = configurations.compileClasspath
503
  source = "${buildDir}/src/hec"
504
  destinationDirectory = new File("${buildDir}/classes/hec")
505
}
506

    
507
task pecCompile(
508
  type: JavaCompile,
509
  dependsOn: ["pec_sources"],
510
  description: "Compile PE for C"
511
) {
512
  classpath = configurations.compileClasspath
513
  source = "${buildDir}/src/pec"
514
  destinationDirectory = new File("${buildDir}/classes/pec")
515
}
516

    
517
task eecCompile(
518
  type: JavaCompile,
519
  dependsOn: ["eec_sources"],
520
  description: "Compile EE for Saxon/C") {
521
  classpath = configurations.compileClasspath
522
  source = "${buildDir}/src/eec"
523
  destinationDirectory = new File("${buildDir}/classes/eec")
524
}
525

    
526
task hec_jar(
527
  type: Jar,
528
  dependsOn: ["hecCompile", "hej_MetaInf"],
529
  description: "Build the HE jar file for Saxon/C"
530
) {
531
  archiveBaseName = "saxon9he"
532
  destinationDirectory = file("${buildDir}/c/jars/hec")
533
  manifest {
534
    attributes "Project-Name": "Saxon-HE"
535
    attributes "Main-Class": "net.sf.saxon.Transform"
536
  }
537
  from ("build/services/saxon-he") {
538
    include "META-INF/**"
539
  }
540
  from ("build/classes/hec") {
541
    include "net/**/*.class"
542
  }
543
  from ("${buildDir}/src") {
544
    include "net/sf/saxon/data/**"
545
  }
546
  doFirst {
547
    mkdir "build/c/jars/hec"
548
  }
549
}
550

    
551
task pec_jar(
552
  type: Jar,
553
  dependsOn: ["pecCompile", "pej_MetaInf"],
554
  description: "Build the PE jar file for Saxon/C"
555
) {
556
  archiveBaseName = "saxon9pe"
557
  destinationDirectory = file("${buildDir}/c/jars/pec")
558
  manifest {
559
    attributes "Project-Name": "Saxon-PE"
560
    attributes "Main-Class": "net.sf.saxon.Transform"
561
  }
562
  from ("build/services/saxon-pe") {
563
    include "META-INF/**"
564
  }
565
  from ("build/classes/pec") {
566
    include "net/**/*.class"
567
    exclude "net/sf/saxon/ant/*.class"
568
    exclude "**/sql/**/*.class"
569
    include "com/saxonica/**/*.class"
570
    exclude "com/saxonica/ee/**/*.class"
571
    exclude "com/saxonica/expr/CastToUnion.class"
572
    exclude "com/saxonica/expr/CastableToUnion.class"
573
    exclude "com/saxonica/expr/CastToList.class"
574
    exclude "com/saxonica/expr/CastableToList.class"
575
    exclude "com/saxonica/Validate.class"
576
    exclude "com/saxonica/CompileStylesheet.class"
577
    exclude "com/saxonica/CompileStylesheet\$TracingObjectOutputStream.class"
578
    exclude "com/saxonica/config/EnterpriseConfiguration.class"
579
    exclude "com/saxonica/config/EnterpriseConfiguration\$SurrogateSchema.class"
580
    exclude "com/saxonica/config/EnterpriseTransformerFactory.class"
581
    exclude "com/saxonica/config/StreamingTransformerFactory.java"
582
    exclude "com/saxonica/config/EnterpriseXPathFactory.class"
583
    include "javax/xml/xquery/*.class"
584
  }
585
  doFirst {
586
    mkdir "build/c/pec"
587
  }
588
}
589

    
590
task eec_jar(
591
  type: Jar,
592
  dependsOn: ["eecCompile", "eej_MetaInf"],
593
  description: "Build the EE jar file for Saxon/C"
594
) {
595
  archiveBaseName = "saxon9ee"
596
  destinationDirectory = file("${buildDir}/c/jars/eec")
597
  manifest {
598
    attributes "Project-Name": "Saxon-EE"
599
    attributes "Main-Class": "net.sf.saxon.Transform"
600
  }
601
  from ("build/services/saxon-ee") {
602
    include "META-INF/**"
603
  }
604
  from ("build/classes/eec") {
605
    include "net/**/*.class"
606
    exclude "net/sf/saxon/ant/*.class"
607
    exclude "**/sql/**/*.class"
608
    include "com/saxonica/**/*.class"
609
    include "javax/xml/xquery/*.class"
610
  }
611
  doFirst {
612
    mkdir "build/c/eec"
613
  }
614
}
(4-4/12)