diff --git a/build.gradle.kts b/build.gradle.kts index 8d1c1259..afc3db37 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -17,6 +17,7 @@ plugins { val jbrVers = "17.0.8.1-b1000.32" val jbrWindowsVers = "jbr_jcef-17.0.8.1-windows-x64-b1000.32" +val jbrLinuxVers = "jbr_jcef-17.0.8.1-linux-x64-b1000.32" downloadJbr { jbrVersion = jbrVers @@ -162,6 +163,16 @@ val defaultScriptArgs = mapOf( fun scriptFile(relativePath: String):File = File("$rootDir/build/scripts/patched/$relativePath") +fun unpackAndRenameJBR(archiveName : String, nameOfDirectoryInsideArchive : String, nameOfJbrDirectory : String) { + val jbrDownloadDir = jdkDir.toString() + "/../jbrDownload"; + //project.delete(files("${jbrDownloadDir}")); + copy { + from(tarTree(resources.gzip(jdkDir.toString() + "/${archiveName}"))) + into(jbrDownloadDir) + } + file(jbrDownloadDir + "/${nameOfDirectoryInsideArchive}").renameTo(file("${jbrDownloadDir}/${nameOfJbrDirectory}")) +} + tasks { val configureJava by registering { dependsOn(downloadJbr) @@ -355,14 +366,40 @@ tasks { val resolvedArtifact = configurations["jbrWin"].resolvedConfiguration.resolvedArtifacts.find { ra -> ra.file.name == filename }!! resolvedArtifact.name + "-" + resolvedArtifact.classifier + "." + resolvedArtifact.extension } + + doLast { + unpackAndRenameJBR("jbr_jcef-windows-x64.tgz", jbrWindowsVers, "jbr_windows"); + } } + val resolveJBR_Linux by registering(Copy::class) { + from(configurations["jbrLinux"]) + into(jdkDir) + rename { filename -> + val resolvedArtifact = configurations["jbrLinux"].resolvedConfiguration.resolvedArtifacts.find { ra -> ra.file.name == filename }!! + resolvedArtifact.name + "-" + resolvedArtifact.classifier + "." + resolvedArtifact.extension + } + + doLast { + unpackAndRenameJBR("jbr_jcef-linux-x64.tgz", jbrLinuxVers, "jbr_linux"); + } + } val package_fasten_distribution_for_specific_platforms by registering(BuildLanguages::class) { - dependsOn(build_fasten_safety_distribution) + dependsOn(resolveJBR_Win, resolveJBR_Linux, build_fasten_safety_distribution) script = scriptFile("build-fasten-distribution-for-specific-platforms.xml") } + val produce_fasten_distribution_win by registering { + dependsOn(package_fasten_distribution_for_specific_platforms) + artifactsDir.file("com.mbeddr.formal.safetyDistribution.platforms/fasten-${version}-Win.zip") + } + + val produce_fasten_distribution_linux by registering { + dependsOn(package_fasten_distribution_for_specific_platforms) + artifactsDir.file("com.mbeddr.formal.safetyDistribution.platforms/fasten-${version}-Linux.tar.gz") + } + val build_all_languages by registering { dependsOn(build_assurance_languages, build_formal_languages) } @@ -500,16 +537,16 @@ publishing { } } } - /* create("FASTEN_WIN_RCP") { + create("FASTEN_WIN_RCP") { groupId = "fasten" artifactId = "win.rcp" - artifact(tasks.named("package_fasten_safety_distribution_win")) + artifact(tasks.named("produce_fasten_distribution_win")) } create("FASTEN_LINUX_RCP") { groupId = "fasten" artifactId = "linux.rcp" - artifact(tasks.named("package_fasten_safety_distribution_linux")) - }*/ + artifact(tasks.named("produce_fasten_distribution_linux")) + } } } diff --git a/code/languages/com.mbeddr.formal.safety/solutions/com.mbeddr.formal.safety.build/models/com.mbeddr.formal.safety.build.mps b/code/languages/com.mbeddr.formal.safety/solutions/com.mbeddr.formal.safety.build/models/com.mbeddr.formal.safety.build.mps index b0cce55c..30105df0 100644 --- a/code/languages/com.mbeddr.formal.safety/solutions/com.mbeddr.formal.safety.build/models/com.mbeddr.formal.safety.build.mps +++ b/code/languages/com.mbeddr.formal.safety/solutions/com.mbeddr.formal.safety.build/models/com.mbeddr.formal.safety.build.mps @@ -17013,27 +17013,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -19807,6 +19786,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -19815,7 +19815,7 @@ - + @@ -20149,6 +20149,27 @@ + + + + + + + + + + + + + + + + + + + + + @@ -20157,7 +20178,7 @@ - +