From df73b36edf74fb69b70a32df1fa812bb576301b3 Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Tue, 27 Dec 2022 19:58:48 +0100 Subject: [PATCH] [Build] Remove unused ant tasks and properties Assume that natives are only build in the Jenkins pipeline or in a Maven build using -Dnative=${os}.${ws}.${arch} The "SWT Classpath Builder.launch" is not necessary anymore since Oomph does the same and the .classpath file suitable for the running platform can also be easily selected and renamed manually. Part of https://github.com/eclipse-platform/eclipse.platform.swt/issues/513 --- Jenkinsfile | 20 +- .../SWT Classpath Builder.launch | 14 - bundles/org.eclipse.swt/build.xml | 74 --- bundles/org.eclipse.swt/buildFragment.xml | 122 +---- bundles/org.eclipse.swt/buildSWT.xml | 446 +----------------- 5 files changed, 16 insertions(+), 660 deletions(-) delete mode 100644 bundles/org.eclipse.swt/.externalToolBuilders/SWT Classpath Builder.launch delete mode 100644 bundles/org.eclipse.swt/build.xml diff --git a/Jenkinsfile b/Jenkinsfile index 4bba2c04b12..d3b411cda12 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,6 +1,6 @@ def nativeBuildAgent(String platform, Closure body) { def final nativeBuildStageName = 'Build SWT-native binaries' - if(platform == 'gtk.linux.x86_64') { + if (platform == 'gtk.linux.x86_64') { return podTemplate(yaml: ''' apiVersion: v1 kind: Pod @@ -59,7 +59,7 @@ pipeline { stages { stage('Checkout swt git repos') { steps { - dir ('eclipse.platform.swt') { + dir('eclipse.platform.swt') { checkout scm script { def authorMail = sh(script: 'git log -1 --pretty=format:"%ce" HEAD', returnStdout: true) @@ -75,7 +75,7 @@ pipeline { git remote set-url --push origin git@github.com:eclipse-platform/eclipse.platform.swt.git ''' } - dir ('eclipse.platform.swt.binaries') { + dir('eclipse.platform.swt.binaries') { checkout([$class: 'GitSCM', branches: [[name: 'refs/heads/master']], extensions: [[$class: 'CloneOption', timeout: 120, noTags: false ]], userRemoteConfigs: [[url: 'https://github.com/eclipse-platform/eclipse.platform.swt.binaries.git']] @@ -102,7 +102,7 @@ pipeline { when { anyOf { expression { return params.forceNativeBuilds } - expression { return fileExists ('tmp/build_changed.txt') && fileExists ('tmp/natives_changed.txt') } + expression { return fileExists('tmp/build_changed.txt') && fileExists('tmp/natives_changed.txt') } } } matrix { @@ -151,7 +151,7 @@ pipeline { } // TODO: don't zip the sources and just (un)stash them unzipped! That safes the unzipping and removal of the the zip withEnv(['MODEL=' + arch, "OUTPUT_DIR=${WORKSPACE}/libs", "SWT_JAVA_HOME=${WORKSPACE}/jdk.resources"]) { - if(isUnix()){ + if (isUnix()){ sh ''' unzip -aa org.eclipse.swt.${PLATFORM}.master.zip rm org.eclipse.swt.${PLATFORM}.master.zip @@ -239,7 +239,7 @@ pipeline { } stage('Commit SWT-native binaries, if build') { when { - expression { return params.forceNativeBuilds || fileExists ('tmp/build_changed.txt') } + expression { return params.forceNativeBuilds || fileExists('tmp/build_changed.txt') } } steps { withAnt(installation: 'apache-ant-latest', jdk: 'openjdk-jdk11-latest') { // nashorn javascript-engine required in ant-scripts @@ -276,14 +276,14 @@ pipeline { } steps { xvnc(useXauthority: true) { - dir ('eclipse.platform.swt.binaries') { + dir('eclipse.platform.swt.binaries') { sh ''' mvn install \ --batch-mode -Pbuild-individual-bundles -DforceContextQualifier=zzz \ -Dcompare-version-with-baselines.skip=true -Dmaven.compiler.failOnWarning=true ''' } - dir ('eclipse.platform.swt') { + dir('eclipse.platform.swt') { sh ''' mvn clean verify \ --batch-mode -DforkCount=0 \ @@ -304,13 +304,13 @@ pipeline { } stage('Push SWT-native binaries, if build') { when { - expression { return params.forceNativeBuilds || fileExists ('tmp/build_changed.txt') } + expression { return params.forceNativeBuilds || fileExists('tmp/build_changed.txt') } } steps { sshagent(['github-bot-ssh']) { script { def newSWTNativesTag = null; - dir ('eclipse.platform.swt.binaries') { + dir('eclipse.platform.swt.binaries') { newSWTNativesTag = sh(script: 'git describe --abbrev=0 --tags --match v[0-9][0-9][0-9][0-9]*', returnStdout: true).strip() } echo "newSWTNativesTag: ${newSWTNativesTag}" diff --git a/bundles/org.eclipse.swt/.externalToolBuilders/SWT Classpath Builder.launch b/bundles/org.eclipse.swt/.externalToolBuilders/SWT Classpath Builder.launch deleted file mode 100644 index 8e49914f398..00000000000 --- a/bundles/org.eclipse.swt/.externalToolBuilders/SWT Classpath Builder.launch +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/bundles/org.eclipse.swt/build.xml b/bundles/org.eclipse.swt/build.xml deleted file mode 100644 index 5d4dbc386e2..00000000000 --- a/bundles/org.eclipse.swt/build.xml +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/bundles/org.eclipse.swt/buildFragment.xml b/bundles/org.eclipse.swt/buildFragment.xml index 10c559c7927..b88c40b1fcc 100644 --- a/bundles/org.eclipse.swt/buildFragment.xml +++ b/bundles/org.eclipse.swt/buildFragment.xml @@ -15,12 +15,11 @@ - + - @@ -35,21 +34,6 @@ - - - - - - - - - - - - - - - @@ -79,7 +63,6 @@ - @@ -104,18 +87,6 @@ - - - - - - - - - - - - @@ -222,48 +193,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -290,53 +219,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/bundles/org.eclipse.swt/buildSWT.xml b/bundles/org.eclipse.swt/buildSWT.xml index a83a9674428..046ddb9ddb4 100644 --- a/bundles/org.eclipse.swt/buildSWT.xml +++ b/bundles/org.eclipse.swt/buildSWT.xml @@ -31,7 +31,6 @@ - @@ -48,42 +47,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Checking ${fragment} - @@ -114,79 +79,6 @@ Success - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ------------------------- - Status: - - ${m_linux_x86_64} - ${m_linux_x86_64_test} - ${m_linux_ppc64le} - ${m_linux_ppc64le_test} - ${m_linux_aarch64} - ${m_linux_aarch64_test} - ${m_mac} - ${m_mac_test} - ------------------------- - - - - - - @@ -206,11 +98,6 @@ - - - - - @@ -229,15 +116,6 @@ Has build changes: ${build_changed} checked against ${swt_tag} - - - - - - - - - @@ -251,14 +129,6 @@ - - - - - - - - Incrementing version from ${swt_version} to ${new_version}... @@ -342,64 +212,6 @@ Version=${swt_version}; New=${new_version}; New comma_ver=${new_comma_ver} - - - - - - Version=${swt_version}; New=${new_version}; New comma_ver=${new_comma_ver} - - - - - - - - Version=${swt_version}; New=${new_version}; New comma_ver=${new_comma_ver} - - @@ -416,8 +228,6 @@ - - @@ -583,7 +393,7 @@ - + @@ -592,77 +402,18 @@ - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -692,142 +443,13 @@ - - Check ${repo} - - - - - - - - - - - - - - - - - - - - - Checking out ${repo}=${checkout_tag} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -863,63 +485,5 @@ - - - - - - - - - - - - - - - - - - - - - ${remotebuilddir} - - - - - - - - - - - - - - - - - ${remotetmpdir} - - - - - - - - - - - - ${remotetmpdir} - - - - - - - - - +