@@ -43,10 +43,11 @@ repositories {
4343sourceSets {
4444 main {
4545 java {
46- srcDir buildDir. getAbsolutePath()+ ' /javasdk/NRSDK/src/'
46+ srcDirs = [ buildDir. getAbsolutePath()+ ' /javasdk/NRSDK/src/' , buildDir . getAbsolutePath() + ' /javasdk/NRSDK/addons/ ' ]
4747 }
4848 resources {
49- srcDir buildDir. getAbsolutePath()+ ' /javasdk/NRSDK/addons/'
49+ srcDirs = [buildDir. getAbsolutePath()+ ' /javasdk/NRSDK/src/' , buildDir. getAbsolutePath()+ ' /javasdk/NRSDK/addons/' ]
50+ includes = [" **/*.fxml" ," **/*.xml" ," **/*.png" ]
5051 }
5152 }
5253}
@@ -58,15 +59,25 @@ dependencies {
5859 compile fileTree (dir : buildDir. getAbsolutePath()+ ' /javasdk/NRSDK/lib_addons/' , includes : [' *.jar' ])
5960}
6061
61-
6262// create a fat-jar (class files plus dependencies
6363// excludes VRL.jar (plugin jar files must not start with 'vrl-\\d+')
6464jar {
6565
66- // dependencies except VRL
67- from configurations. runtime. asFileTree.
68- filter({file -> return ! file. name. startsWith(" vrl-0" )}).
69- files. collect { zipTree(it) }
66+ // remove the security files (from mail.jar / activation.jar) so that the jar will be executable.
67+
68+ doFirst {
69+ // dependencies except VRL
70+ from (configurations. runtime. asFileTree.
71+ filter({file -> return ! file. name. startsWith(" vrl-0" )}).
72+ files. collect { zipTree(it) } ){
73+ exclude ' META-INF/MANIFEST.MF'
74+ exclude ' META-INF/*.SF'
75+ exclude ' META-INF/*.DSA'
76+ exclude ' META-INF/*.RSA'
77+ }
78+ }
79+
80+
7081
7182 // project class files compiled from source
7283 from files(sourceSets. main. output. classesDir)
0 commit comments