-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#68 vmf-edit is part of 0.2.9.4 release.
- Loading branch information
Showing
7 changed files
with
260 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# version number (is used for core, runtime and default dependencies in plugin and plugin) | ||
# publication.version = 0.3-SNAPSHOT | ||
publication.version=0.2.9.5-SNAPSHOT | ||
publication.version=0.2.9.4 | ||
#publication.version=0.2.9.3 | ||
#publication.version=0.2.8.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,26 @@ | ||
import java.text.SimpleDateFormat | ||
|
||
|
||
plugins { | ||
id 'application' | ||
id 'org.openjfx.javafxplugin' version '0.1.0' | ||
id 'org.beryx.jlink' version '2.25.0' | ||
id 'com.github.node-gradle.node' version '3.3.0' | ||
|
||
id 'com.github.hierynomus.license' version '0.16.1' | ||
id 'maven-publish' | ||
id 'net.nemerosa.versioning' version '3.0.0' | ||
id 'com.github.ben-manes.versions' version '0.44.0' | ||
} | ||
|
||
group 'eu.mihosoft.vmf' | ||
version '1.0.0-SNAPSHOT' | ||
|
||
ext.commonProps = new Properties() | ||
file(new File(projectDir.parentFile,"config/common.properties")).withInputStream { commonProps.load(it) } | ||
|
||
apply plugin: 'java-library' | ||
apply from: 'gradle/publishing.gradle' | ||
|
||
version = "${project.commonProps.get('publication.version')}" | ||
|
||
// installer version (used for jlink/jpackge) | ||
// parse version with three '.' separated numbers from full version string | ||
|
@@ -27,8 +41,8 @@ ext { | |
junitVersion = '5.8.2' | ||
} | ||
|
||
sourceCompatibility = '23' | ||
targetCompatibility = '23' | ||
sourceCompatibility = '17' | ||
targetCompatibility = '17' | ||
|
||
tasks.withType(JavaCompile) { | ||
options.encoding = 'UTF-8' | ||
|
@@ -120,4 +134,35 @@ copyFontAwesomeToResources.dependsOn installFontAwesome | |
processResources.dependsOn copyFontAwesomeToResources | ||
|
||
copyBootStrapToResources.dependsOn installBootStrap | ||
processResources.dependsOn copyBootStrapToResources | ||
processResources.dependsOn copyBootStrapToResources | ||
|
||
jar { | ||
manifest { | ||
attributes('Automatic-Module-Name': 'eu.mihosoft.vmf.vmfedit') | ||
} | ||
|
||
// // add velocity legacy to jar file | ||
// from { | ||
// configurations.legacyVelocity.collect { it.isDirectory() ? it : zipTree(it) } | ||
// } | ||
} | ||
|
||
license { | ||
header = rootProject.file('core/config/HEADER') | ||
strictCheck = true | ||
ignoreFailures = true | ||
mapping { | ||
java = 'SLASHSTAR_STYLE' | ||
groovy = 'SLASHSTAR_STYLE' | ||
fxml = 'XML_STYLE' | ||
} | ||
|
||
ext.yearCurrent = new SimpleDateFormat("yyyy").format(new Date()) | ||
ext.yearSince1 = '2017' | ||
ext.author1 = 'Michael Hoffer <[email protected]>' | ||
ext.yearSince2 = '2017' | ||
ext.author2 = 'Goethe Center for Scientific Computing, University Frankfurt' | ||
|
||
exclude '**/*.svg' | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// ----------------------------------------------------------------------------- | ||
// publishing information | ||
// ----------------------------------------------------------------------------- | ||
ext.publishingInfo.artifactId = project.name.toLowerCase() | ||
ext.publishingInfo.groupId = 'eu.mihosoft.vmf' | ||
ext.publishingInfo.versionId = ext.commonProps.get("publication.version") | ||
|
||
ext.publishingInfo.developerName = 'Michael Hoffer' | ||
ext.publishingInfo.developerAlias = 'miho' | ||
ext.publishingInfo.developerEmail = '[email protected]' | ||
ext.publishingInfo.inceptionYear = '2017' | ||
|
||
ext.publishingInfo.desc = 'VMF JSon Schema Editor Support (VRL Modeling Framework) adds editor support via json schema.' | ||
ext.publishingInfo.license = 'Apache-2.0' | ||
ext.publishingInfo.licenseUrl = 'https://github.com/miho/VMF/blob/master/LICENSE' | ||
ext.publishingInfo.labels = ['vmf', 'modeling', 'data model', 'vrl', 'modeling framework'] | ||
ext.publishingInfo.websiteUrl = 'https://github.com/miho/VMF' | ||
ext.publishingInfo.issueTrackerUrl = 'https://github.com/miho/VMF/issues' | ||
ext.publishingInfo.vcsUrl = 'https://github.com/miho/VMF.git' | ||
|
||
ext.publishingInfo.gitHubMavenRepo = "https://maven.pkg.github.com/miho/vmf" | ||
|
||
ext.publishingInfo.pomName = ext.publishingInfo.artifactId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
// ----------------------------------------------------------------------------- | ||
// Collect publishing information | ||
// ----------------------------------------------------------------------------- | ||
ext.publishingInfo = [:] | ||
|
||
ext.publishingInfo.pomName = ext.publishingInfo.artifactId | ||
|
||
apply from: "gradle/project-info.gradle" | ||
apply plugin: 'signing' | ||
|
||
// ----------------------------------------------------------------------------- | ||
// Performs publishing | ||
// ----------------------------------------------------------------------------- | ||
|
||
task javadocJar(type: Jar, dependsOn: javadoc) { | ||
archiveClassifier = 'javadoc' | ||
from javadoc.destinationDir | ||
} | ||
|
||
// create one jar for the source files | ||
task sourcesJar(type: Jar, dependsOn: classes) { | ||
archiveClassifier = 'sources' | ||
from sourceSets.main.allSource | ||
} | ||
|
||
artifacts { | ||
archives jar | ||
archives javadocJar | ||
archives sourcesJar | ||
} | ||
|
||
Date buildTimeAndDate = new Date() | ||
ext { | ||
buildDate = new java.text.SimpleDateFormat('yyyy-MM-dd').format(buildTimeAndDate) | ||
buildTime = new java.text.SimpleDateFormat('HH:mm:ss.SSSZ').format(buildTimeAndDate) | ||
} | ||
|
||
jar { | ||
manifest { | ||
attributes( | ||
'Built-By': System.properties['user.name'], | ||
'Created-By': System.properties['java.version'] + " (" + System.properties['java.vendor'] + " " + System.properties['java.vm.version'] + ")", | ||
'Build-Date': project.buildDate, | ||
'Build-Time': project.buildTime, | ||
'Build-Revision': versioning.info.commit, | ||
'Specification-Title': project.name, | ||
'Specification-Version': project.version, | ||
'Implementation-Title': project.name, | ||
'Implementation-Version': project.version | ||
) | ||
} | ||
} | ||
|
||
|
||
def pomConfig = { | ||
name ext.publishingInfo.pomName | ||
description ext.publishingInfo.desc | ||
url ext.publishingInfo.websiteUrl | ||
inceptionYear ext.publishingInfo.inceptionYear | ||
licenses { | ||
license([:]) { | ||
name ext.publishingInfo.license | ||
url ext.publishingInfo.licenseUrl | ||
distribution 'repo' | ||
} | ||
} | ||
scm { | ||
url ext.publishingInfo.vcsUrl | ||
connection ext.publishingInfo.vcsUrl | ||
developerConnection ext.publishingInfo.vcsUrl | ||
} | ||
developers { | ||
developer { | ||
id ext.publishingInfo.developerNameAlias | ||
name ext.publishingInfo.developerName | ||
} | ||
} | ||
} | ||
|
||
|
||
|
||
publishing { | ||
|
||
repositories { | ||
// -------------------------------------------------------------------------------- | ||
// Destination Repository 'GitHubPackages' | ||
// -> call task 'publishMavenJavaPublicationToGitHubPackagesRepository' to publish | ||
// -------------------------------------------------------------------------------- | ||
maven { | ||
name = "GitHubPackages" | ||
// see https://levelup.gitconnected.com/publish-a-maven-package-to-github-with-gradle-fabc6de24d6 | ||
// Replace OWNER and REPOSITORY with your GitHub username/repository | ||
// (must be both lowercase according to the documenations) | ||
// url = uri("https://maven.pkg.github.com/OWNER/REPOSITORY") | ||
url = uri(project.findProperty('publishingInfo').gitHubMavenRepo) | ||
credentials { | ||
// Make sure to generate a token with write-packages and read-packages permission: | ||
// https://github.com/settings/tokens/new | ||
// You can either store the username and token in | ||
// ~/.gradle/gradle.properties (use the gpr.user and gpr.key keys) | ||
// Or you can store them as environment variables e.g. in ~/.bash_profile or ~/.zsh | ||
// depending on your shell (GITHUB_USERNAME and GITHUB_TOKEN keys) | ||
// Or you pass them via CLI: gradle publish -Pgpr.user=username -Pgpr.key=token | ||
// See at EOF for examples on how to store the credentials | ||
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME") | ||
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN") | ||
} | ||
} | ||
|
||
// -------------------------------------------------------------------------------- | ||
// Destination Repository 'OSSRH' | ||
// telling gradle to publish artifact to local directory | ||
// -> call task 'publishMavenJavaPublicationToOSSRHRepository' to publish | ||
// -> go to https://oss.sonatype.org/#stagingRepositories, click 'close', drink coffee and then click 'release' | ||
// if closing was successful | ||
// -------------------------------------------------------------------------------- | ||
maven { | ||
name = "OSSRH" | ||
url "https://oss.sonatype.org/service/local/staging/deploy/maven2" | ||
credentials { | ||
username = project.findProperty("oss.user") ?: System.getenv("OSS_USERNAME") | ||
password = project.findProperty("oss.pwd") ?: System.getenv("OSS_PWD") | ||
} | ||
} | ||
|
||
// -------------------------------------------------------------------------------- | ||
// Destination Repository 'BuildDir' | ||
// telling gradle to publish artifact to local directory | ||
// -> call task 'publishMavenJavaPublicationToBuildDirRepository' to publish | ||
// -------------------------------------------------------------------------------- | ||
maven { | ||
name = "BuildDir" | ||
url "file:/${buildDir}/artifacts" | ||
} | ||
} | ||
|
||
|
||
publications { | ||
mavenJava(MavenPublication) { | ||
groupId publishingInfo.groupId | ||
artifactId publishingInfo.artifactId | ||
version publishingInfo.versionId | ||
from components.java | ||
artifact sourcesJar | ||
artifact javadocJar | ||
|
||
pom.withXml { | ||
def root = asNode() | ||
root.appendNode 'description', publishingInfo.desc | ||
root.children().last() + pomConfig | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
if( | ||
project.findProperty("signing.secretKeyRingFile") | ||
&& project.findProperty("signing.password") | ||
&& project.findProperty("signing.keyId") | ||
) { | ||
|
||
signing { | ||
sign publishing.publications | ||
} | ||
|
||
} else { | ||
println "> skipping signing, provide\n" + | ||
" - 'signing.secretKeyRingFile'\n" + | ||
" - 'signing.password'\n" + | ||
" - 'signing.keyId'\n" + | ||
" to activate it\n" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
rootProject.name = "vmfedit" | ||
rootProject.name = "vmf-edit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters