|
1 | 1 | plugins {
|
2 | 2 | id "java"
|
3 |
| - id "application" |
4 |
| - id "org.openmicroscopy.project" version "5.5.0-m5" |
| 3 | + id "org.openmicroscopy.insight" |
| 4 | + id "org.openmicroscopy.distribute" |
| 5 | + id "org.openmicroscopy.publish" |
| 6 | + id "org.openmicroscopy.additional-repositories" version "5.5.0-m5" |
5 | 7 | }
|
6 | 8 |
|
7 | 9 | group = "org.openmicroscopy"
|
8 | 10 | version = "5.5.0-SNAPSHOT"
|
9 |
| -targetCompatibility = JavaVersion.VERSION_1_8 |
10 |
| -sourceCompatibility = JavaVersion.VERSION_1_8 |
11 | 11 |
|
12 | 12 | repositories {
|
13 | 13 | mavenLocal()
|
14 | 14 | jcenter()
|
15 | 15 | }
|
16 | 16 |
|
| 17 | +java { |
| 18 | + sourceCompatibility = JavaVersion.VERSION_1_8 |
| 19 | + targetCompatibility = JavaVersion.VERSION_1_8 |
| 20 | +} |
| 21 | + |
17 | 22 | dependencies {
|
18 | 23 | testImplementation("junit:junit:4.12")
|
19 | 24 |
|
| 25 | + if (JavaVersion.current().isJava9Compatible()) { |
| 26 | + implementation('com.sun.activation:javax.activation:1.2.0') |
| 27 | + } |
20 | 28 | implementation("com.mortennobel:java-image-scaling:0.8.6")
|
21 | 29 | implementation("com.google.code.gson:gson:2.8.5")
|
22 | 30 | implementation("com.zeroc:glacier2:3.6.4")
|
23 | 31 | implementation("info.clearthought:table-layout:4.3.0")
|
24 | 32 | implementation("insight:JHotDraw:7.0.9")
|
25 | 33 | implementation("net.imagej:ij:1.48s")
|
26 |
| - implementation("net.java.dev.jna:jna-platform:5.2.0") |
| 34 | + implementation("net.java.dev.jna:jna-platform:5.3.0") |
27 | 35 | implementation("org.apache.poi:poi:4.0.1")
|
28 | 36 | implementation("org.apache.commons:commons-collections4:4.3")
|
29 | 37 | implementation("org.apache.httpcomponents:httpmime:4.5.7")
|
30 | 38 | implementation("org.apache.httpcomponents:httpclient:4.5.7")
|
31 | 39 | implementation("org.apache.httpcomponents:httpcomponents-client:4.5.7")
|
32 | 40 | implementation("org.jfree:jfreechart:1.0.19")
|
33 |
| - implementation("org.openmicroscopy:omero-blitz:5.5.0-m5") |
34 | 41 | implementation("org.swinglabs:swingx:1.6.1")
|
35 |
| - if (JavaVersion.current().isJava9Compatible()) { |
36 |
| - implementation("javax.activation:activation:1.1.1") |
37 |
| - } |
38 |
| -} |
39 |
| - |
40 |
| -application { |
41 |
| - mainClassName = "org.openmicroscopy.shoola.Main" |
42 |
| - applicationDefaultJvmArgs = ["-Xms256m", "-Xmx1024m"] |
43 |
| -} |
44 |
| - |
45 |
| -run { |
46 |
| - args = ["container.xml", "${project.buildDir}"] |
47 |
| -} |
48 |
| - |
49 |
| -// Run the importer task |
50 |
| -task runImporter(dependsOn: 'classes', type: JavaExec) { |
51 |
| - classpath = sourceSets.main.runtimeClasspath |
52 |
| - main = "org.openmicroscopy.shoola.Main" |
53 |
| - args = ["containerImporter.xml", "${project.buildDir}"] |
54 |
| - applicationDefaultJvmArgs = ["-Xms256m", "-Xmx1024m"] |
55 |
| -} |
56 |
| - |
57 |
| -// Create the jar for imageJ plugin |
58 |
| -task omeroijJar(dependsOn: 'classes', type: Jar) { |
59 |
| - archiveBaseName = "omero_ij" |
60 |
| - from sourceSets.main.output |
61 |
| - manifest = project.manifest { |
62 |
| - attributes("Main-Class": "org.openmicroscopy.shoola.MainIJPlugin") |
63 |
| - from(jar.manifest) { |
64 |
| - eachEntry { details -> |
65 |
| - if (details.baseValue != details.mergeValue && details.baseValue != null) { |
66 |
| - details.value = baseValue |
67 |
| - } else { |
68 |
| - details.value = details.mergeValue |
69 |
| - } |
70 |
| - } |
71 |
| - } |
72 |
| - } |
73 |
| - |
74 |
| -} |
75 |
| - |
76 |
| - |
77 |
| -// Set the mainclass in the manifest |
78 |
| -jar { |
79 |
| - manifest { |
80 |
| - attributes("Main-Class": application.mainClassName) |
81 |
| - } |
82 |
| -} |
83 |
| - |
84 |
| - |
85 |
| -artifacts { |
86 |
| - archives omeroijJar |
87 |
| -} |
88 |
| - |
89 |
| -distributions { |
90 |
| - |
91 |
| - main { |
92 |
| - contents { |
93 |
| - from("src/config") { |
94 |
| - into "config" |
95 |
| - } |
96 |
| - } |
97 |
| - } |
98 |
| - // prepare imagej.zip |
99 |
| - imagej { |
100 |
| - contents { |
101 |
| - from("src/config") { |
102 |
| - into "config" |
103 |
| - } |
104 |
| - from omeroijJar |
105 |
| - into('lib') { |
106 |
| - from configurations.compileClasspath |
107 |
| - } |
108 |
| - } |
109 | 42 |
|
| 43 | + implementation("org.openmicroscopy:omero-blitz:5.5.0-m5") { |
| 44 | + // Conflicts with `net.java.dev.jna` |
| 45 | + exclude group: "com.sun.jna", module: "jna" |
| 46 | + exclude group: "org.springframework" |
110 | 47 | }
|
111 | 48 | }
|
112 | 49 |
|
113 |
| -tasks.withType(Tar) { |
114 |
| - enabled = false |
115 |
| -} |
116 |
| - |
117 |
| -// N.B. processConfig may not be fully required if you just set the second |
118 |
| -// run task arg as ${project.projectDir}/src/config |
119 |
| -task processConfig(type: Copy) { |
120 |
| - from "src/config" |
121 |
| - into "${project.buildDir}/config" |
122 |
| -} |
123 |
| - |
124 |
| -classes.dependsOn processConfig |
125 |
| - |
126 | 50 | test {
|
127 | 51 | testLogging.showStandardStreams = true
|
128 | 52 | systemProperties = System.getProperties()
|
|
0 commit comments