X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=build.gradle;h=798aec65b183aee938d69fab29a670cc9fc6c963;hb=b906be80cb0fc9fbb3b3b480a3744574d25ae003;hp=a3aaa67463b86ac02ae55f2eaa2e32b9ab6c2ccf;hpb=3a91e32cec33edd851a621f4395dd4a22aae3442;p=jalview.git diff --git a/build.gradle b/build.gradle index a3aaa67..798aec6 100644 --- a/build.gradle +++ b/build.gradle @@ -78,6 +78,26 @@ ext { } } + //// + // Import releaseProps from the RELEASE file + // or a file specified via JALVIEW_RELEASE_FILE if defined + // Expect jalview.version and target release branch in jalview.release + def releaseProps = new Properties(); + def releasePropFile = findProperty("JALVIEW_RELEASE_FILE"); + def defaultReleasePropFile = "${jalviewDirAbsolutePath}/RELEASE"; + try { + (new File(releasePropFile!=null ? releasePropFile : defaultReleasePropFile)).withInputStream { + releaseProps.load(it) + } + } catch (Exception fileLoadError) { + throw new Error("Couldn't load release properties file "+(releasePropFile==null ? defaultReleasePropFile : "from custom location: releasePropFile"),fileLoadError); + } + //// + // Set JALVIEW_VERSION if it is not already set + if (findProperty(JALVIEW_VERSION)==null || "".equals(JALVIEW_VERSION)) { + JALVIEW_VERSION = releaseProps.get("jalview.version") + } + // this property set when running Eclipse headlessly j2sHeadlessBuildProperty = string("net.sf.j2s.core.headlessbuild") // this property set by Eclipse @@ -202,6 +222,11 @@ ext { case "DEVELOP": reportRsyncCommand = true + + // DEVELOP-RELEASE is usually associated with a Jalview release series so set the version + JALVIEW_VERSION=JALVIEW_VERSION+"-develop" + + install4jSuffix = "Develop" install4jDSStore = "DS_Store-DEVELOP" install4jDMGBackgroundImage = "jalview_dmg_background-DEVELOP.png" install4jExtraScheme = "jalviewd" @@ -210,7 +235,10 @@ ext { case "TEST-RELEASE": reportRsyncCommand = true - JALVIEW_VERSION = "TEST" + + // TEST-RELEASE is usually associated with a Jalview release series so set the version + JALVIEW_VERSION=JALVIEW_VERSION+"-test" + install4jSuffix = "Test" install4jDSStore = "DS_Store-TEST-RELEASE" install4jDMGBackgroundImage = "jalview_dmg_background-TEST.png" @@ -481,8 +509,8 @@ sourceSets { // clover bits dependencies { + cloverCompile 'org.openclover:clover:4.4.1' if (use_clover) { - cloverCompile 'org.openclover:clover:4.4.1' testCompile 'org.openclover:clover:4.4.1' } } @@ -634,7 +662,7 @@ task cloverInstr { outputs.dir cloverInstrDir doFirst { - delete cloverInstrDir + //delete cloverInstrDir def argsList = [ "--initstring", cloverDb, @@ -746,6 +774,8 @@ cleanTest { dependsOn cleanClover doFirst { delete sourceSets.test.java.outputDir + delete cloverInstrDir + delete cloverDb } } @@ -930,6 +960,16 @@ test { workingDir = jalviewDir //systemProperties 'clover.jar' System.properties.clover.jar + def testLaf = project.findProperty("test_laf") + if (testLaf != null) { + println("Setting Test LaF to '${testLaf}'") + systemProperty "laf", testLaf + } + def testHiDPIScale = project.findProperty("test_HiDPIScale") + if (testHiDPIScale != null) { + println("Setting Test HiDPI Scale to '${testHiDPIScale}'") + systemProperty "sun.java2d.uiScale", testHiDPIScale + } sourceCompatibility = compile_source_compatibility targetCompatibility = compile_target_compatibility jvmArgs += additional_compiler_args