Skip to content

Commit

Permalink
cleaned up gradle file
Browse files Browse the repository at this point in the history
  • Loading branch information
Niko Stotz committed Mar 1, 2021
1 parent bc5bb8a commit c084457
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 29 deletions.
50 changes: 22 additions & 28 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def defaultScriptArgs = [
'build.dir' : buildDir,
'mps.generator.skipUnmodifiedModels': incrementalBuild,
'version' : mbeddrCppVersion,
'mbeddr.cpp.version' : mbeddrCppVersion,
'mbeddr.cpp.version' : mbeddrCppVersion,
]
def defaultScriptClasspath = project.configurations.junitAnt.fileCollection { true }

Expand Down Expand Up @@ -97,14 +97,8 @@ task setup {
description 'Set up MPS project libraries. Libraries are read in from projectlibraries.properties file.'
}

ext.releaseArtifacts = { ->
{ -> new File(new File(artifactsDir, "com.mbeddr.cpp"), "com.mbeddr.cpp-${mbeddrCppVersion}.zip") }
}

//def releaseArtifacts = new File(new File(artifactsDir, "com.mbeddr.cpp")
// .listFiles()
// .findAll {it.name.endsWith("zip")}
// .each {it.absolutePath}
def releaseArtifacts = ["${artifactsDir}/com.mbeddr.cpp/com.mbeddr.cpp-${mbeddrCppVersion}.zip"]

github {
owner = 'DSLFoundry'
Expand All @@ -113,35 +107,35 @@ github {
tagName = "v-$mbeddrCppVersion"
targetCommitish = System.getenv().CI_COMMIT_SHA != null ? System.getenv().CI_COMMIT_SHA : "master"
name = "mbeddr C++ Extensions v$mbeddrCppVersion"
assets = ["${artifactsDir}/com.mbeddr.cpp/com.mbeddr.cpp-${mbeddrCppVersion}.zip"]
assets = releaseArtifacts
// body = ReleaseNotes.getReleaseNotes(file("RELEASE_NOTES.md"))
}

publishing {
repositories {
maven {
name = "GitHubPackages"
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/DSLFoundry/mbeddr.core")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
}
publications {
gpr(MavenPublication) {
groupId = 'com.mbeddr'
artifactId = 'cpp'
version = "$mbeddrCppVersion"
artifacts = [releaseArtifacts()]
pom {
name = "mbeddr C++ Extensions"
url = "https://github.com/DSLFoundry/mbeddr.core"
}
}
}
}
}
publications {
gpr(MavenPublication) {
groupId = 'com.mbeddr'
artifactId = 'cpp'
version = "$mbeddrCppVersion"
artifacts = releaseArtifacts
pom {
name = "mbeddr C++ Extensions"
url = "https://github.com/DSLFoundry/mbeddr.core"
}
}
}
}

build.dependsOn buildLanguages
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mbeddrCppVersion = 0.1.3
mbeddrCppVersion = 0.1.4

0 comments on commit c084457

Please sign in to comment.