From 361b97b24cbf2e11f019976b2dbcb92e60bacbf6 Mon Sep 17 00:00:00 2001 From: dgelessus <dgelessus@users.noreply.github.com> Date: Mon, 3 Jul 2023 15:44:00 +0200 Subject: [PATCH] Put all features in the same category instead of one per feature --- build.gradle | 15 +++++++++++++++ tycho_build.gradle | 23 ++++++----------------- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/build.gradle b/build.gradle index 552ae10f..746f7dd3 100644 --- a/build.gradle +++ b/build.gradle @@ -8,6 +8,21 @@ project.ext { ] groupID = "de.prob" + + categoryId = "de.prob2.feature.category" + categoryLabel = "ProB for Rodin" + // When editing the description here, + // also update the descriptions in all feature.xml files! + categoryDescription = """\ + ProB is an animator and model checker for the B-Method. It allows + fully automatic animation of many B specifications, and can be + used to systematically check a specification for errors. + Part of the research and development was conducted within the + EPSRC funded projects ABCD and iMoc, and within the EU funded + projects Rodin and Deploy and the DFG projects Gepavas and Gepavas II. + ProB has been successfully used on various industrial specifications + and is now being used e.g. within Siemens, Alstom, Thales and ClearSy. + """.stripIndent() } apply from: 'tycho_build.gradle' diff --git a/tycho_build.gradle b/tycho_build.gradle index 4e76b2d7..8e66a6f3 100644 --- a/tycho_build.gradle +++ b/tycho_build.gradle @@ -484,21 +484,10 @@ task createRepository() { featureVersionNumber = parsedXml.attribute("version") featureArtifactId = parsedXml.attribute("id") - if (noDescriptions) { - categoryDescriptions[0].put(features[i], parsedXml.attribute("label")) - categoryDescriptions[1].put(features[i], parsedXml.description.text()) - } - f << categoryFeatures(featureArtifactId.replace(workspacePath, ''), featureVersionNumber) + f << categoryFeature(categoryId, featureArtifactId.replace(workspacePath, ''), featureVersionNumber) } - for (int i = 0; i < features.size(); i++) { - if (noDescriptions) { - // featureName, label, description - f << categoryDescription(features[i], categoryDescriptions[0][features[i]],categoryDescriptions[1][features[i]]) - } else { - f << categoryDescription(features[i], categoryDescriptions[features[i]][0],categoryDescriptions[features[i]][1]) - } - } + f << categoryDef(categoryId, categoryLabel, categoryDescription) f << categoryEnd() @@ -723,14 +712,14 @@ def categoryHead() {"""\ <site> """} -def categoryFeatures(artifactId, versionNumber) {""" +def categoryFeature(category, artifactId, versionNumber) {""" <feature url="features/${artifactId}_${versionNumber}.jar" id="${artifactId}" version="${versionNumber}"> - <category name="${artifactId}.category"/> + <category name="${category}"/> </feature> """} -def categoryDescription(artifactId, categoryName, categorydescription) {""" - <category-def name="${artifactId}.category" label="${categoryName}"> +def categoryDef(id, label, categorydescription) {""" + <category-def name="${id}" label="${label}"> <description> ${categorydescription} </description> -- GitLab