Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ jobs:
name: Test Results ${{ matrix.os }}
if-no-files-found: warn
path: |
${{ github.workspace }}/**/build/test-results/**/*.xml
${{ github.workspace }}/**/build/reports/
${{ github.workspace }}/**/target/surefire-reports**


- name: Run API Compare
Expand Down
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,7 @@ bin/
target/
build/
xtend-gen/
.gradle/
.idea/
META-INF/
org.eclipse.buildship.core.prefs
org.eclipse.jdt.core.prefs
org.eclipse.xtext.java.Java.prefs
org.eclipse.xtend.core.Xtend.prefs
*.class
*._trace
*.xtendbin
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Contribution Guide

The project is build with Gradle and written in Java 11.
The project is build with Maven and written in Java 11.

To start working on it simply clone and run `./gradlew build`. See the section [below](#Eclipse) on building and editing with Eclipse for step-by-step instructions.
To start working on it simply clone and run `mvn verify`. See the section [below](#Eclipse) on building and editing with Eclipse for step-by-step instructions.

# ECA

Expand Down
124 changes: 124 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
pipeline {
agent {
kubernetes {
// See comment in deplog-build.sh (gpg:sign-and-deploy-file)
inheritFrom 'ubuntu-2404'
}
}
tools {
maven 'apache-maven-latest'
// Default JDK picked up from here, build and test requires
// older JDKs too, which are discovered by gradle from ~/.m2/toolchains.xml
jdk 'temurin-jdk21-latest'
}
options {
timestamps()
disableConcurrentBuilds()
}
stages {
stage('Clean') {
steps {
timeout(activity: true, time: 20) {
sh '''
git status --ignored
git clean -dfx
git reset --hard HEAD
git status --ignored
'''
}
}
}
stage('Gradle') {
steps {
timeout(activity: true, time: 20) {
sh "echo $JAVA_HOME"
sh "java -version"
sh "which java"
sh "cat ~/.m2/toolchains.xml"
sh "./gradlew \
--no-daemon \
-PignoreTestFailures=true \
--refresh-dependencies \
--continue \
clean build jmhCompileGeneratedClasses testOlderJavas signJar publish \
"
}
}
}
stage('Maven') {
steps {
timeout(activity: true, time: 20) {
sh "mvn \
-f releng/pom.xml \
-Dmaven.repo.local=.repository \
--batch-mode --update-snapshots \
clean install -Psign \
"
}
}
}
stage('japicmp') {
steps {
timeout(activity: true, time: 20) {
sh "./releng/runjapicmp.sh"
}
}
}
stage('Deploy Snapshot') {
steps {
timeout(activity: true, time: 20) {
withCredentials([file(credentialsId: 'secret-subkeys.asc', variable: 'KEYRING')]) {
sh 'gpg --batch --import "${KEYRING}"'
sh 'for fpr in $(gpg --list-keys --with-colons | awk -F: \'/fpr:/ {print $10}\' | sort -u); do echo -e "5\ny\n" | gpg --batch --command-fd 0 --expert --edit-key ${fpr} trust; done'
}
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
// Skip Deploy on release builds
// XXX: Can release vs snapshot be detected automatically so that
// the following line does not have to be commented/uncommented
// on each change to/from SNAPSHOT?
sh 'cd releng && ./deploy-build.sh'
}
}
}
}
}
post {
always {
junit '**/target/surefire-reports**/*.xml'
archiveArtifacts '**/target/surefire-reports**'
}
cleanup {
script {
def curResult = currentBuild.currentResult
def lastResult = 'NEW'
if (currentBuild.previousBuild != null) {
lastResult = currentBuild.previousBuild.result
}

if (curResult != 'SUCCESS' || lastResult != 'SUCCESS') {
def color = ''
switch (curResult) {
case 'SUCCESS':
color = '#00FF00'
break
case 'UNSTABLE':
color = '#FFFF00'
break
case 'FAILURE':
color = '#FF0000'
break
default: // e.g. ABORTED
color = '#666666'
}

matrixSendMessage https: true,
hostname: 'matrix.eclipse.org',
accessTokenCredentialsId: "matrix-token",
roomId: '!OVFCkkbjNkALzklVdr:matrix.eclipse.org',
body: "${lastResult} => ${curResult} ${env.BUILD_URL} | ${env.JOB_NAME}#${env.BUILD_NUMBER}",
formattedBody: "<div><font color='${color}'>${lastResult} => ${curResult}</font> | <a href='${env.BUILD_URL}' target='_blank'>${env.JOB_NAME}#${env.BUILD_NUMBER}</a></div>"
}
}
}
}
}
22 changes: 22 additions & 0 deletions bnd-common.bnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Eclipse-SourceReferences: \
scm:git:https://github.com/eclipse-lsp4j/lsp4j.git;path="${project.artifactId}"
Bundle-SymbolicName: ${project.artifactId}
Bundle-Name: ${project.name}
Bundle-Version: ${project.version}
Bundle-Vendor: Eclipse LSP4J
Bundle-RequiredExecutionEnvironment: JavaSE-${maven.compiler.release}
Automatic-Module-Name: ${project.artifactId}

pkg.version: ${version;===;${version_cleanup;${project.version}}}
-exportcontents: org.eclipse.lsp4j.*;version="${pkg.version}"

# Use https://github.com/bndtools/bnd/blob/master/maven-plugins/bnd-maven-plugin/README.md#reproducible-builds
# to allow saving the manifest into git too - this makes it easier
# to verify the MANIFEST is changed as expected
-savemanifest: ${project.basedir}/META-INF/MANIFEST.MF
-snapshot: SNAPSHOT
-noextraheaders: true
-removeheaders: Bundle-DocURL

# Place this warning comment in the output MANIFEST
X-Comment-LSP4J: This file is auto-generates, edit the bnd.bnd file, not the MANIFEST.MF file, and regenerate with maven
2 changes: 2 additions & 0 deletions bnd.bnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-include: bnd-common.bnd
Import-Package: com.google.gson.*;version="${gson.version.range}",*
192 changes: 0 additions & 192 deletions build.gradle

This file was deleted.

9 changes: 0 additions & 9 deletions gradle.properties

This file was deleted.

Loading
Loading