[] added Eclipse-SourceReferences to manifests

Signed-off-by: Christian Dietrich <christian.dietrich@itemis.de>
This commit is contained in:
Christian Dietrich 2019-11-15 12:02:35 +01:00
parent 0f5f3637b0
commit 98bd79e264
8 changed files with 19 additions and 0 deletions
gradle
org.eclipse.xtext.ide/META-INF
org.eclipse.xtext.testing/META-INF
org.eclipse.xtext.util/META-INF
org.eclipse.xtext.xtext.generator/META-INF
org.eclipse.xtext.xtext.ide/META-INF
org.eclipse.xtext.xtext.wizard/META-INF
org.eclipse.xtext/META-INF

View file

@ -17,6 +17,18 @@ def qualifiedVersion = baseVersion + '.v' + buildTime
ext.manifestReplacements = new HashMap()
manifestReplacements.put(baseVersion + '.qualifier', qualifiedVersion)
def eclipseSourceReferences() {
def rootPath = java.nio.file.Paths.get(project.rootProject.projectDir.canonicalPath)
def projectPath = java.nio.file.Paths.get(project.projectDir.canonicalPath)
def relativePath = rootPath.relativize(projectPath)
def url = grgit.remote.list().findAll{ it.name == "origin" }.first().url
def commitId = grgit.head().id
return "scm:git:${url};path=\"${relativePath}\"" + (commitId ? ";commitId=${commitId}" : "")
}
manifestReplacements.put("eclipseSourceReferences", eclipseSourceReferences())
File manifestFile = project.file("$buildDir/tmp/genManifest/MANIFEST.MF")
task genManifest(type: Copy) {

View file

@ -65,3 +65,4 @@ Export-Package: org.eclipse.xtext.ide;x-friends:="org.eclipse.xtend.ide,
org.eclipse.xtext.ide.server.symbol,
org.eclipse.xtext.ide.util
Automatic-Module-Name: org.eclipse.xtext.ide
Eclipse-SourceReferences: eclipseSourceReferences

View file

@ -30,3 +30,4 @@ Import-Package: org.apache.log4j;version="1.2.15",
org.junit.jupiter.api.extension;version="[5.0.0,6.0.0)";resolution:=optional
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.eclipse.xtext.testing
Eclipse-SourceReferences: eclipseSourceReferences

View file

@ -48,3 +48,4 @@ Require-Bundle: org.eclipse.emf.ecore;bundle-version="2.10.2",
org.eclipse.xtend.lib
Import-Package: org.apache.log4j;version="1.2.15"
Automatic-Module-Name: org.eclipse.xtext.util
Eclipse-SourceReferences: eclipseSourceReferences

View file

@ -83,3 +83,4 @@ Export-Package: org.eclipse.xtext.xtext.generator,
org.eclipse.xtext.extras.tests,
org.eclipse.xtext.xbase"
Automatic-Module-Name: org.eclipse.xtext.xtext.generator
Eclipse-SourceReferences: eclipseSourceReferences

View file

@ -12,3 +12,4 @@ Export-Package: org.eclipse.xtext.xtext.ide;x-friends:="org.eclipse.xtext.xtext.
org.eclipse.xtext.xtext.ide.contentassist.antlr;x-friends:="org.eclipse.xtext.xtext.ui",
org.eclipse.xtext.xtext.ide.contentassist.antlr.internal;x-friends:="org.eclipse.xtext.xtext.ui"
Automatic-Module-Name: org.eclipse.xtext.xtext.ide
Eclipse-SourceReferences: eclipseSourceReferences

View file

@ -14,3 +14,4 @@ Require-Bundle: org.eclipse.xtext.xbase.lib;bundle-version="2.20.0",
org.eclipse.xtext.util,
org.eclipse.emf.ecore;bundle-version="2.10.2"
Automatic-Module-Name: org.eclipse.xtext.xtext.wizard
Eclipse-SourceReferences: eclipseSourceReferences

View file

@ -248,3 +248,4 @@ Import-Package: org.apache.log4j;version="1.2.15",org.osgi.framework
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.xtext.internal.Activator
Automatic-Module-Name: org.eclipse.xtext
Eclipse-SourceReferences: eclipseSourceReferences