11apply plugin : " java-library"
22
3+ configurations {
4+ managerRuntime
5+ }
6+
37dependencies {
48 api project(" :setup" )
9+ managerRuntime " io.openremote:openremote-manager:$openremoteVersion "
510}
611
7- task license {
12+ tasks . register( ' license' ) {
813 doLast {
9- def toConcatenate = files(" ${ project(":openremote").projectDir} /LICENSE.txt" , " ${ rootDir} /LICENSE.txt" )
14+ def licenseFiles = new ArrayList<> ()
15+ licenseFiles. add(" ${ rootDir} /LICENSE.txt" )
16+
17+ def toConcatenate = files(licenseFiles. toArray())
1018 def outputFileName = " ${ buildDir} /image/manager/app/LICENSE.txt"
1119 def output = new File (outputFileName)
1220 if (output. exists()) {
@@ -19,8 +27,9 @@ task license {
1927 }
2028}
2129
22- task installDist (type : Copy ) {
23- dependsOn (parent. getTasksByName(' installDist' , true ). findAll {
30+ tasks. register(' installDist' , Copy ) {
31+ duplicatesStrategy = DuplicatesStrategy . EXCLUDE
32+ dependsOn(parent. getTasksByName(' installDist' , true ). findAll {
2433 // Don't create circular dependency or depend on built in openremote submodule apps
2534 it. project != project && ! it. project. path. startsWith(" :openremote:ui:app" )
2635 })
@@ -31,10 +40,14 @@ task installDist(type: Copy) {
3140
3241 into(" image" ) {
3342 from projectDir
34- exclude " build.gradle" , " Dockerfile" , " build" , " **/*.mbtiles" , " src" , " **/*.md" , " .gitignore"
43+ exclude " build.gradle" , " Dockerfile" , " build" , " **/*.mbtiles" , " src" , " **/*.md" , " .gitignore" , " **/*.encrypted "
3544 }
3645
3746 into(" image/manager/extensions" ) {
38- from getDeploymentJars()
47+ from configurations. runtimeClasspath. resolvedConfiguration. resolvedArtifacts. collect {it. file }
48+ // Don't include deps baked into the manager docker image
49+ exclude configurations. managerRuntime. resolvedConfiguration. resolvedArtifacts. collect {it. file. name }
50+ // Don't include any ui packaged JARs (used for dev purposes only)
51+ exclude { (it. file. path. contains(" .gradle" ) || it. file. path. contains(" .m2" )) && it. file. path. contains(" io.openremote.ui" ) }
3952 }
4053}
0 commit comments