Project

Profile

Help

Download (19.8 KB) Statistics
| Branch: | Revision:

he / build-c.gradle @ d1236b02

1 72bf04c6 Norman Walsh
// Find Excelsior Jet to build the Saxon/C releases
2
def excelsiorJetHome = null
3
["${excelsiorJet}",
4 eb295486 Norman Walsh
 "/opt/jet15.3-ent-amd64",
5
 "/usr/local/jet15.3-ent-amd64",
6 72bf04c6 Norman Walsh
 "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 2699858e Norman Walsh
task hec_featureKeys(
282
  type: JavaExec,
283 4ae20fb4 Norman Walsh
  dependsOn: ["hej_featureKeys"],
284 2699858e Norman Walsh
  description: "Construct the feature keys for HE"
285
) {
286
  inputs.files fileTree(dir: "${projectDir}/tools/featureKeys")
287
  outputs.file "${projectDir}/src/main/csharp/api/Saxon.Api/Feature.cs"
288
  outputs.file "${projectDir}/src/main/csharp/api/Saxon.Api/FeatureKeys.cs"
289
  classpath = configurations.preprocessor
290
  main = "net.sf.saxon.Transform"
291
  args "${projectDir}/tools/featureKeys/FeatureKeys.xml",
292
    "-xsl:${projectDir}/tools/featureKeys/FeatureKeysToCSharp.xsl",
293
    "-o:${projectDir}/src/main/csharp/api/Saxon.Api/establish-an-output-base-uri"
294
}
295
296 72bf04c6 Norman Walsh
task hec_setupPreprocess(
297
  type: Copy,
298 2699858e Norman Walsh
  dependsOn: ["hec_featureKeys"],
299 72bf04c6 Norman Walsh
  description: "Copy HE sources for preprocessing HE"
300
) {
301
  into "${buildDir}/filtered/hec"
302
  from("${projectDir}/src/main/java") {
303
    include "net/sf/saxon/**/*.java"
304
    include "net/sf/saxon/data/**"
305
    exclude "javax/xml/xquery/*.java"
306
    exclude "**/dotnet/**"
307
    include "net/sf/saxon/**/package.html"
308
    include "net/sf/saxon/data/**"
309
    exclude "net/sf/saxon/testdriver/**"
310
    exclude "net/sf/saxon/option/axiom/**"
311
    exclude "net/sf/saxon/option/dom4j/**"
312
    exclude "net/sf/saxon/option/jdom/**"
313
    exclude "net/sf/saxon/option/jdom2/**"
314
    exclude "net/sf/saxon/option/xom/**"
315
    exclude "net/sf/saxon/option/sql/**"
316
  }
317
}
318
319
task pec_setupPreprocess(
320
  type: Copy,
321 4ae20fb4 Norman Walsh
  dependsOn: ["hec_featureKeys"],
322 72bf04c6 Norman Walsh
  description: "Copy PE sources for preprocessing PE"
323
) {
324
  into "${buildDir}/filtered/pec"
325
  from("${projectDir}/src/main/java") {
326
    include "net/sf/saxon/**/*.java"
327
    include "javax/xml/xquery/*.java"
328
    include "net/sf/saxon/data/**"
329
    exclude "**/dotnet/**"
330
    include "net/sf/saxon/**/package.html"
331
    exclude "net/sf/saxon/testdriver/**"
332
    exclude "net/sf/saxon/option/axiom/**"
333
    exclude "net/sf/saxon/option/dom4j/**"
334
    exclude "net/sf/saxon/option/jdom/**"
335
    exclude "net/sf/saxon/option/jdom2/**"
336
    exclude "net/sf/saxon/option/xom/**"
337
    exclude "net/sf/saxon/option/sql/**"
338
    include "com/saxonica/**/*.java"
339
    exclude "com/saxonica/testdriver/**"
340
    exclude "com/saxonica/testdriver/ee/**/*.java"
341
    exclude "com/saxonica/testdriver/old/**/*.java"
342
    exclude "com/saxonica/ee/**"
343
    exclude "com/saxonica/config/EnterpriseConfiguration.java"
344
    exclude "com/saxonica/expr/CastToUnion.java"
345
    exclude "com/saxonica/expr/CastableToUnion.java"
346
    exclude "com/saxonica/expr/DotNetExtensionFunctionCall.java"
347
    exclude "com/saxonica/config/ee/**"
348
    exclude "com/saxonica/js/**"
349
    exclude "com/saxonica/config/DotNetExtensionLibrary.java"
350
    exclude "com/saxonica/config/DotNetExtensionFunctionFactory.java"
351
    exclude "com/saxonica/config/DotNetPlatformPE.java"
352
    exclude "com/saxonica/config/JavaPlatformPE.java"
353
    exclude "com/saxonica/config/JavaPlatformEE.java"
354
    exclude "com/saxonica/Validate.java"
355
    exclude "com/saxonica/config/EnterpriseTransformerFactory.java"
356
    exclude "com/saxonica/config/StreamingTransformerFactory.java"
357
    exclude "com/saxonica/config/EnterpriseXPathFactory.java"
358
    exclude "com/saxonica/config/DynamicLoaderEE.java"
359
    exclude "com/saxonica/config/StandardSchemaResolver.java"
360
    exclude "com/saxonica/jaxp/SchemaFactoryImpl11.java"
361
  }
362
}
363
364
task eec_setupPreprocess(
365
  type: Copy,
366 4ae20fb4 Norman Walsh
  dependsOn: ["hec_featureKeys"],
367 72bf04c6 Norman Walsh
  description: "Copy EE sources for preprocessing EE"
368
) {
369
  into "${buildDir}/filtered/eec"
370
  from("${projectDir}/src/main/java") {
371
    include "net/sf/saxon/**/*.java"
372
    include "javax/xml/xquery/*.java"
373
    include "net/sf/saxon/data/**"
374
    exclude "**/dotnet/**"
375
    include "net/sf/saxon/**/package.html"
376
    exclude "net/sf/saxon/testdriver/**"
377
    exclude "net/sf/saxon/option/axiom/**"
378
    exclude "net/sf/saxon/option/dom4j/**"
379
    exclude "net/sf/saxon/option/jdom/**"
380
    exclude "net/sf/saxon/option/jdom2/**"
381
    exclude "net/sf/saxon/option/xom/**"
382
    exclude "net/sf/saxon/option/sql/**"
383
    include "com/saxonica/**/*.java"
384
    exclude "com/saxonica/testdriver/**/*.java"
385
    exclude "com/saxonica/js/**"
386
    exclude "com/saxonica/ee/bytecode/**"
387
    exclude "com/saxonica/config/DotNetExtensionFunctionFactory.java"
388
    exclude "com/saxonica/config/DotNetExtensionLibrary.java"
389
    exclude "com/saxonica/config/DotNetPlatformPE.java"
390
    exclude "com/saxonica/config/JavaPlatformPE.java"
391
    exclude "com/saxonica/config/JavaPlatformEE.java"
392
    exclude "com/saxonica/expr/DotNetExtensionFunctionCall.java"
393
    include "com/saxonica/**/package.html"
394
  }
395
}
396
397
task hec_preprocess(
398
  type: JavaExec,
399
  dependsOn: ["hec_setupPreprocess"],
400
  description: "Preprocess HE sources"
401
) {
402
  inputs.files fileTree(dir: "${buildDir}/filtered/hec")
403
  outputs.files fileTree(dir: "${buildDir}/preprocess/hec")
404
  classpath = configurations.preprocessor
405
  main = "com.igormaznitsa.jcp.JcpPreprocessor"
406
  args "/c",
407
    "/i:${buildDir}/filtered/hec", "/o:${buildDir}/preprocess/hec",
408
    "/p:EE=false", "/p:PE=false", "/p:DOTNET=false",
409
    "/p:SAXONC=true", "/p:BYTECODE=false", "/p:OPT=false"
410
  doFirst {
411
    mkdir "${buildDir}/preprocess/hec"
412
  }
413
}
414
415
task pec_preprocess(
416
  type: JavaExec,
417
  dependsOn: ["pec_setupPreprocess"],
418
  description: "Preprocess PE sources"
419
) {
420
  inputs.files fileTree(dir: "${buildDir}/filtered/pec")
421
  outputs.files fileTree(dir: "${buildDir}/preprocess/pec")
422
  classpath = configurations.preprocessor
423
  main = "com.igormaznitsa.jcp.JcpPreprocessor"
424
  args "/c",
425
    "/i:${buildDir}/filtered/pec", "/o:${buildDir}/preprocess/pec",
426
    "/p:EE=false", "/p:PE=true", "/p:DOTNET=false",
427
    "/p:SAXONC=true", "/p:BYTECODE=false", "/p:OPT=false",
428
    "/p:HOF=true"
429
  doFirst {
430
    mkdir "${buildDir}/preprocess/pec"
431
  }
432
}
433
434
task eec_preprocess(
435
  type: JavaExec,
436
  dependsOn: ["eec_setupPreprocess"],
437
  description: "Preprocess EE sources"
438
) {
439
  inputs.files fileTree(dir: "${buildDir}/filtered/eec")
440
  outputs.files fileTree(dir: "${buildDir}/preprocess/eec")
441
  classpath = configurations.preprocessor
442
  main = "com.igormaznitsa.jcp.JcpPreprocessor"
443
  args "/c",
444
    "/i:${buildDir}/filtered/eec", "/o:${buildDir}/preprocess/eec",
445
    "/p:EE=true", "/p:PE=false", "/p:DOTNET=false",
446
    "/p:SAXONC=true", "/p:BYTECODE=false", "/p:HOF=true",
447
    "/p:STREAM=true", "/p:SCHEMA=true", "/p:PACKAGES=true",
448
    "/p:OPT=false"
449
  doFirst {
450
    mkdir "${buildDir}/preprocess/eec"
451
  }
452
}
453
454
task hec_sources(
455
  type: Copy,
456
  dependsOn: ["hec_preprocess"],
457
  description: "Collect the preprocessed HE sources for compilation"
458
) {
459
  from "${buildDir}/preprocess/hec"
460
  into "${buildDir}/src/hec"
461
  filter { line ->
462
    line.contains("import com.saxonica")
463
      ? null
464
      : line
465
  }
466
}
467
468
task pec_sources(
469
  type: Copy,
470
  dependsOn: ["pec_preprocess"],
471
  description: "Collect the preprocessed PE sources for compilation"
472
) {
473
  from "${buildDir}/preprocess/pec"
474
  into "${buildDir}/src/pec"
475
  filter { line ->
476
    if (line.contains("import com.saxonica.ee")
477
        || line.contains("import com.saxonica.config.ee")
478
        || line.contains("net.sf.saxon.dotnet")) {
479
      null
480
    } else {
481
      line
482
    }
483
  }
484
}
485
486
task eec_sources(
487
  type: Copy,
488
  dependsOn: ["eec_preprocess"],
489
  description: "Collect the preprocessed EE sources for compilation"
490
) {
491
  from "${buildDir}/preprocess/eec"
492
  into "${buildDir}/src/eec"
493
  filter { line ->
494
    line.contains("import com.saxonica.ee.bytecode")
495
      ? null
496
      : line
497
  }
498
}
499
500
task hecCompile(
501
  type: JavaCompile,
502
  dependsOn: ["hec_sources"],
503
  description: "Compile HE for C"
504
) {
505
  classpath = configurations.compileClasspath
506
  source = "${buildDir}/src/hec"
507
  destinationDirectory = new File("${buildDir}/classes/hec")
508
}
509
510
task pecCompile(
511
  type: JavaCompile,
512
  dependsOn: ["pec_sources"],
513
  description: "Compile PE for C"
514
) {
515
  classpath = configurations.compileClasspath
516
  source = "${buildDir}/src/pec"
517
  destinationDirectory = new File("${buildDir}/classes/pec")
518
}
519
520
task eecCompile(
521
  type: JavaCompile,
522
  dependsOn: ["eec_sources"],
523
  description: "Compile EE for Saxon/C") {
524
  classpath = configurations.compileClasspath
525
  source = "${buildDir}/src/eec"
526
  destinationDirectory = new File("${buildDir}/classes/eec")
527
}
528
529
task hec_jar(
530
  type: Jar,
531
  dependsOn: ["hecCompile", "hej_MetaInf"],
532
  description: "Build the HE jar file for Saxon/C"
533
) {
534
  archiveBaseName = "saxon9he"
535
  destinationDirectory = file("${buildDir}/c/jars/hec")
536
  manifest {
537
    attributes "Project-Name": "Saxon-HE"
538
    attributes "Main-Class": "net.sf.saxon.Transform"
539
  }
540
  from ("build/services/saxon-he") {
541
    include "META-INF/**"
542
  }
543
  from ("build/classes/hec") {
544
    include "net/**/*.class"
545
  }
546
  from ("${buildDir}/src") {
547
    include "net/sf/saxon/data/**"
548
  }
549
  doFirst {
550
    mkdir "build/c/jars/hec"
551
  }
552
}
553
554
task pec_jar(
555
  type: Jar,
556
  dependsOn: ["pecCompile", "pej_MetaInf"],
557
  description: "Build the PE jar file for Saxon/C"
558
) {
559
  archiveBaseName = "saxon9pe"
560
  destinationDirectory = file("${buildDir}/c/jars/pec")
561
  manifest {
562
    attributes "Project-Name": "Saxon-PE"
563
    attributes "Main-Class": "net.sf.saxon.Transform"
564
  }
565
  from ("build/services/saxon-pe") {
566
    include "META-INF/**"
567
  }
568
  from ("build/classes/pec") {
569
    include "net/**/*.class"
570
    exclude "net/sf/saxon/ant/*.class"
571
    exclude "**/sql/**/*.class"
572
    include "com/saxonica/**/*.class"
573
    exclude "com/saxonica/ee/**/*.class"
574
    exclude "com/saxonica/expr/CastToUnion.class"
575
    exclude "com/saxonica/expr/CastableToUnion.class"
576
    exclude "com/saxonica/expr/CastToList.class"
577
    exclude "com/saxonica/expr/CastableToList.class"
578
    exclude "com/saxonica/Validate.class"
579
    exclude "com/saxonica/CompileStylesheet.class"
580
    exclude "com/saxonica/CompileStylesheet\$TracingObjectOutputStream.class"
581
    exclude "com/saxonica/config/EnterpriseConfiguration.class"
582
    exclude "com/saxonica/config/EnterpriseConfiguration\$SurrogateSchema.class"
583
    exclude "com/saxonica/config/EnterpriseTransformerFactory.class"
584
    exclude "com/saxonica/config/StreamingTransformerFactory.java"
585
    exclude "com/saxonica/config/EnterpriseXPathFactory.class"
586
    include "javax/xml/xquery/*.class"
587
  }
588
  doFirst {
589
    mkdir "build/c/pec"
590
  }
591
}
592
593
task eec_jar(
594
  type: Jar,
595
  dependsOn: ["eecCompile", "eej_MetaInf"],
596
  description: "Build the EE jar file for Saxon/C"
597
) {
598
  archiveBaseName = "saxon9ee"
599
  destinationDirectory = file("${buildDir}/c/jars/eec")
600
  manifest {
601
    attributes "Project-Name": "Saxon-EE"
602
    attributes "Main-Class": "net.sf.saxon.Transform"
603
  }
604
  from ("build/services/saxon-ee") {
605
    include "META-INF/**"
606
  }
607
  from ("build/classes/eec") {
608
    include "net/**/*.class"
609
    exclude "net/sf/saxon/ant/*.class"
610
    exclude "**/sql/**/*.class"
611
    include "com/saxonica/**/*.class"
612
    include "javax/xml/xquery/*.class"
613
  }
614
  doFirst {
615
    mkdir "build/c/eec"
616
  }
617
}