From 6b1574cb22cb48c554b29efd2564ec25c5e318d0 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Fri, 1 Nov 2019 00:57:00 +0000 Subject: [PATCH] JAL-3210 Automatic buildship/eclipse update to site when making changes to code --- .settings/org.eclipse.jdt.core.jalview.prefs | 24 ++++++++-------- build.gradle | 40 ++++++++++++++++++++++---- 2 files changed, 46 insertions(+), 18 deletions(-) diff --git a/.settings/org.eclipse.jdt.core.jalview.prefs b/.settings/org.eclipse.jdt.core.jalview.prefs index d25627d..f99b921 100644 --- a/.settings/org.eclipse.jdt.core.jalview.prefs +++ b/.settings/org.eclipse.jdt.core.jalview.prefs @@ -1,10 +1,10 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore -org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull -org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable org.eclipse.jdt.core.compiler.annotation.nullable.secondary= org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled @@ -21,8 +21,8 @@ org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=ignore org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning org.eclipse.jdt.core.compiler.problem.deadCode=warning -org.eclipse.jdt.core.compiler.problem.deprecation=warning org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecation=warning org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled org.eclipse.jdt.core.compiler.problem.discouragedReference=warning org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore @@ -31,8 +31,8 @@ org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled @@ -45,8 +45,8 @@ org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning @@ -62,8 +62,8 @@ org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore -org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore @@ -86,8 +86,8 @@ org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore @@ -107,9 +107,6 @@ org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=11 org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false -org.eclipse.jdt.core.formatter.align_with_spaces=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=52 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 @@ -140,6 +137,9 @@ org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 org.eclipse.jdt.core.formatter.blank_lines_after_package=1 org.eclipse.jdt.core.formatter.blank_lines_before_field=1 @@ -154,8 +154,8 @@ org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=next_line_on_wrap -org.eclipse.jdt.core.formatter.brace_position_for_block=next_line org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line +org.eclipse.jdt.core.formatter.brace_position_for_block=next_line org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line @@ -189,6 +189,7 @@ org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indentation.size=2 org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true @@ -199,7 +200,6 @@ org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false -org.eclipse.jdt.core.formatter.indentation.size=2 org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert diff --git a/build.gradle b/build.gradle index 96d6b8a..902b896 100644 --- a/build.gradle +++ b/build.gradle @@ -445,6 +445,9 @@ eclipse { } } // jdt + + synchronizationTasks "eclipseSynchronizationTask" + autoBuildTasks "eclipseAutoBuildTask" } @@ -1508,7 +1511,7 @@ task jalviewjsEclipseSetup { dependsOn jalviewjsCreateJ2sSettings } -task jalviewjsCopyResources (type: Sync) { +task jalviewjsSyncResources (type: Sync) { dependsOn jalviewjsSitePath def inputFiles = fileTree(dir: "${jalviewDir}/${resourceDir}") def outputDir = "${jalviewDir}/${jalviewjsSiteDir}/${jalviewjs_j2s_subdir}" @@ -1527,7 +1530,7 @@ task jalviewjsCopyResources (type: Sync) { inputs.files inputFiles } -task jalviewjsCopySiteResources (type: Sync) { +task jalviewjsSyncSiteResources (type: Sync) { dependsOn jalviewjsSitePath def inputFiles = fileTree(dir: "${jalviewDir}/${jalviewjs_site_resource_dir}") def outputDir = "${jalviewDir}/${jalviewjsSiteDir}" @@ -1638,17 +1641,31 @@ task jalviewjsCopyTransferSite(type: Copy) { into "${jalviewDir}/${jalviewjsSiteDir}" } +// this Sync version is used by buildship to keep the website automatically up to date when a file changes +task jalviewjsSyncTransferSite(type: Sync) { + from "${jalviewDir}/${jalviewjsTransferSiteDir}" + include "**/*.*" + into "${jalviewDir}/${jalviewjsSiteDir}" + preserve { + include "**" + } +} + jalviewjsUnzipFiles.mustRunAfter jalviewjsCopyTransferSite -jalviewjsCopyResources.mustRunAfter jalviewjsCopyTransferSite -jalviewjsCopySiteResources.mustRunAfter jalviewjsCopyTransferSite +jalviewjsSyncResources.mustRunAfter jalviewjsCopyTransferSite +jalviewjsSyncSiteResources.mustRunAfter jalviewjsCopyTransferSite + +jalviewjsUnzipFiles.mustRunAfter jalviewjsSyncTransferSite +jalviewjsSyncResources.mustRunAfter jalviewjsSyncTransferSite +jalviewjsSyncSiteResources.mustRunAfter jalviewjsSyncTransferSite task jalviewjsPrepareSite { group "JalviewJS" description "Prepares the website folder including unzipping files and copying resources" dependsOn jalviewjsSitePath dependsOn jalviewjsUnzipFiles - dependsOn jalviewjsCopyResources - dependsOn jalviewjsCopySiteResources + dependsOn jalviewjsSyncResources + dependsOn jalviewjsSyncSiteResources } task jalviewjsBuildSite { @@ -1778,3 +1795,14 @@ task jalviewjsIDE_Server { dependsOn jalviewjsServer } +// buildship runs this at import +task eclipseSynchronizationTask { + dependsOn eclipseSetup + dependsOn jalviewjsIDE_j2s +} + +// buildship runs this at build time +task eclipseAutoBuildTask { + dependsOn jalviewjsSyncTransferSite + dependsOn jalviewjsPrepareSite +} -- 1.7.10.2