Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Belle2021-05-06 13:36:40 +0000
committerJan Belle2021-05-07 08:12:29 +0000
commite949830678a8eb0d98ffe8ce6f4d8997b73da3b2 (patch)
treeeb50647f2754374461cb35a75465e0e2196b58cf
parent87c97ff024c1f8572bcc1de7a843dfa994df1bde (diff)
downloadorg.eclipse.etrice-master.tar.gz
org.eclipse.etrice-master.tar.xz
org.eclipse.etrice-master.zip
[runtime.c] Publish platform specific code in separate artifactsHEADmaster
-rw-r--r--runtime/org.eclipse.etrice.modellib.c/build.gradle4
-rw-r--r--runtime/org.eclipse.etrice.runtime.c/build.gradle35
-rw-r--r--settings.gradle14
3 files changed, 42 insertions, 11 deletions
diff --git a/runtime/org.eclipse.etrice.modellib.c/build.gradle b/runtime/org.eclipse.etrice.modellib.c/build.gradle
index ced714fd3..243e95049 100644
--- a/runtime/org.eclipse.etrice.modellib.c/build.gradle
+++ b/runtime/org.eclipse.etrice.modellib.c/build.gradle
@@ -58,9 +58,7 @@ task zipModellib(type: Zip, dependsOn: syncGenDir) {
build.dependsOn zipModellib
zipSource {
- from(modelSet.room.genDir) {
- into 'src'
- }
+ from(modelSet.room.genDir)
}
publishing {
diff --git a/runtime/org.eclipse.etrice.runtime.c/build.gradle b/runtime/org.eclipse.etrice.runtime.c/build.gradle
index 40d9790b7..7d1369c91 100644
--- a/runtime/org.eclipse.etrice.runtime.c/build.gradle
+++ b/runtime/org.eclipse.etrice.runtime.c/build.gradle
@@ -7,7 +7,7 @@ plugins {
apply from: "$rootDir/gradle/publish.gradle"
-def platform = ''
+def platform = 'UNKNOWN'
if(isFamily(FAMILY_WINDOWS)) { platform = 'MT_WIN_MinGW' }
else if(isFamily(FAMILY_UNIX)) { platform = 'MT_POSIX_GENERIC_GCC' }
@@ -32,12 +32,7 @@ model {
}
zipSource {
- from(['src/common', 'src/config', 'src/util']) {
- into 'src'
- }
- from('src/platforms') {
- into 'platform'
- }
+ from('src/common', 'src/config', 'src/util')
}
publishing {
@@ -47,4 +42,28 @@ publishing {
}
}
repositories publishRepos
-} \ No newline at end of file
+}
+
+// Configure publishing of platforms
+subprojects {
+ buildDir = parent.layout.buildDirectory.dir("platforms/${project.name}")
+
+ apply plugin: 'de.protos.source-publish'
+ apply from: "$rootDir/gradle/publish.gradle"
+
+ zipSource {
+ from layout.projectDirectory
+ exclude '*Examples/'
+ }
+
+ publishing {
+ publications {
+ etrice(MavenPublication) {
+ artifactId = "${parent.project.name}.${project.name}"
+ from components.adhoc
+ }
+ }
+ repositories publishRepos
+ }
+}
+
diff --git a/settings.gradle b/settings.gradle
index 77d965f2f..6adda5150 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -69,3 +69,17 @@ include 'plugins:org.eclipse.etrice.core.common',
'releng:org.eclipse.etrice.releng',
'releng:org.eclipse.etrice.site'
+
+// Include selected platforms of the c runtime as individual subprojects
+def runtime = project(':runtime:org.eclipse.etrice.runtime.c')
+['MT_POSIX_GENERIC_GCC',
+ 'MT_WIN_MinGW',
+ 'MT_32Bit_FreeRTOS_Generic',
+ 'ST_32Bit_Generic'
+].each { platform ->
+ def name = platform.toLowerCase().replace('_', '-')
+ def path = "${runtime.path}:${name}"
+ def dir = file("${runtime.projectDir}/src/platforms/${platform}")
+ include path
+ project(path).projectDir = dir
+}

Back to the top