From 01a733c58dda046018e7cee338fe0b86a005893a Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Fri, 22 Nov 2024 16:33:59 +0000 Subject: [PATCH] JAL-4492 Exclude applet classes for desktop build. Not tested jalviewjs build yet as it appears to be broken on my machine at the moment. --- build.gradle | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/build.gradle b/build.gradle index d466891..a350de3 100644 --- a/build.gradle +++ b/build.gradle @@ -596,14 +596,32 @@ ext { jalviewjsChromiumUserDir = "${jalviewjsBuildDir}/${jalviewjs_chromium_user_dir}" jalviewjsChromiumProfileDir = "${ext.jalviewjsChromiumUserDir}/${jalviewjs_chromium_profile_name}" + if (!project.hasProperty("jalviewLite")) { + jalviewLite = false + } // ENDEXT } +gradle.taskGraph.whenReady { graph -> + jalviewLite = graph.hasTask("jalviewjsTranspile") +} + + sourceSets { main { java { srcDirs sourceDir + + if (! jalviewLite) { + exclude "${sourceDir}/jalview/bin/JalviewLite.java" + exclude "${sourceDir}/jalview/urls/applet/**" + exclude "${sourceDir}/jalview/javascript/*.java" + exclude "${sourceDir}/jalview/appletgui/**" + exclude "${sourceDir}/com/stevesoft/**" + exclude "${sourceDir}/mc_view/Applet*.java" + } + outputDir = file(classesDir) } @@ -640,6 +658,11 @@ sourceSets { test { java { srcDirs testSourceDir + + if (! jalviewLite) { + exclude "${testSourceDir}/jalview/bin/JalviewLiteTest.java" + } + outputDir = file(testClassesDir) } -- 1.7.10.2