From: Ben Soares Date: Thu, 14 Nov 2019 15:55:35 +0000 (+0000) Subject: JAL-3210 .build_properties now created in /resources, which is found in Eclipse/build... X-Git-Tag: Release_2_11_4_0~45^2~18^2~51 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=133fe28024b59a8103cbd6beb10c15e18e37e0dc;p=jalview.git JAL-3210 .build_properties now created in /resources, which is found in Eclipse/buildship classpath. Does not affect jar build --- diff --git a/.gitignore b/.gitignore index 543fe0f..35be978 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,4 @@ TESTNG /jalviewjsTest.html /site1 /site2 +/resource/.build_properties diff --git a/build.gradle b/build.gradle index 0117ffc..43f2c1c 100644 --- a/build.gradle +++ b/build.gradle @@ -83,6 +83,12 @@ ext { } else { println("HEADLESS BUILD") } + + J2S_ENABLED = (project.hasProperty('j2s.compiler.status') && project['j2s.compiler.status'] != null && project['j2s.compiler.status'] == "enable") + if (J2S_ENABLED) { + println("J2S ENABLED") + } + /* *-/ System.properties.sort { it.key }.each { key, val -> println("SYSTEM PROPERTY ${key}='${val}'") @@ -212,6 +218,7 @@ ext { break } +buildProperties = string("${resourceDir}/${build_properties_file}") getdownAppDir = string("${getdownWebsiteDir}/${getdown_app_dir}") //getdownJ11libDir = "${getdownWebsiteDir}/${getdown_j11lib_dir}" @@ -531,7 +538,7 @@ eclipse { if (IN_ECLIPSE) { // Don't want these to be activated if in headless build synchronizationTasks "eclipseSynchronizationTask" - autoBuildTasks "eclipseAutoBuildTask" + //autoBuildTasks "eclipseAutoBuildTask" } } @@ -664,6 +671,8 @@ task setGitVals { task createBuildProperties(type: WriteProperties) { + group = "build" + description = "Create the ${buildProperties} file" dependsOn setGitVals inputs.dir(sourceDir) inputs.dir(resourceDir) @@ -679,6 +688,13 @@ task createBuildProperties(type: WriteProperties) { } +clean { + doFirst { + delete buildProperties + } +} + + task cleanBuildingHTML(type: Delete) { doFirst { delete buildingHTML @@ -774,6 +790,7 @@ task syncLib(type: Sync) { task syncResources(type: Sync) { + dependsOn createBuildProperties from resourceDir include "**/*.*" into "${classesDir}" @@ -885,6 +902,7 @@ task cleanPackageDir(type: Delete) { } } + jar { dependsOn linkCheck dependsOn buildIndices @@ -2270,8 +2288,8 @@ task jalviewjsIDE_checkJ2sPlugin { doFirst { def j2sPlugin = string("${jalviewDir}/${jalviewjs_j2s_plugin}") def j2sPluginFile = file(j2sPlugin) - def eclipseHome = System.properties["eclipse.home.location"] def copyPlugin = jalviewjs_eclipseIDE_auto_copy_j2s_plugin == "true" + def eclipseHome = System.properties["eclipse.home.location"] def doCopy = false if (eclipseHome == null || ! IN_ECLIPSE) { throw new StopExecutionException("Cannot find running Eclipse home from System.properties['eclipse.home.location']. Skipping J2S Plugin Check.") @@ -2368,15 +2386,19 @@ task jalviewjsIDE_Server { // buildship runs this at import or gradle refresh task eclipseSynchronizationTask { //dependsOn eclipseSetup - dependsOn jalviewjsIDE_j2sFile - dependsOn jalviewjsIDE_checkJ2sPlugin + dependsOn createBuildProperties + if (J2S_ENABLED) { + dependsOn jalviewjsIDE_j2sFile + dependsOn jalviewjsIDE_checkJ2sPlugin + dependsOn jalviewjsIDE_PrepareSite + } } // buildship runs this at build time or project refresh task eclipseAutoBuildTask { //dependsOn jalviewjsIDE_checkJ2sPlugin - dependsOn jalviewjsIDE_PrepareSite + //dependsOn jalviewjsIDE_PrepareSite }