diff --git a/.gitignore b/.gitignore index 2abd271..191a8e2 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,6 @@ ivoatexmeta.tex # Misc *.swp +/.idea/ +/.gradle/ +/build/ diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..02b2277 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + id("net.ivoa.vo-dml.vodmltools") version "0.3.19" + `maven-publish` + application +} + +group = "org.javastro.ivoa.dm" +version = "1.0-SNAPSHOT" + +vodml { + vodmlDir.set(file("vo-dml")) + vodslDir.set(file("model")) + bindingFiles.setFrom(file("vo-dml/coord.vodml-binding.xml") + ) + +} +/* uncomment below to run the generation of vodml from vodsl automatically */ +//tasks.named("vodmlJavaGenerate") { +// dependsOn("vodslToVodml") +//} + +tasks.register("UmlToVodml", net.ivoa.vodml.gradle.plugin.XmiTask::class.java) { + xmiScript.set("xmi2vo-dml_Modelio3.7_UML2.4.1.xsl") // the conversion script + xmiFile.set(file("./model/coords_1.0_uml2p4p1.xmi")) //the UML XMI to convert + vodmlFile.set(file("./vo-dml/Coords-v1.0.vo-dml.xml")) // the output VO-DML file. + description = "convert UML to VO-DML" +} + + +dependencies { + api("org.javastro.ivoa.vo-dml:ivoa-base:1.0-SNAPSHOT") // IMPL using API so that it appears in transitive compile +} + +publishing { + publications { + create("maven") { + from(components["java"]) + } + } +} + +application { + mainClass.set("Genschema") +} diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..2469d2d --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,22 @@ +rootProject.name = "coordinateDM" + +pluginManagement { + repositories { + mavenLocal() // IMPL allow picking up from local - should be removed when publishing + gradlePluginPortal() + } +} + +dependencyResolutionManagement { + repositories { + mavenLocal() + mavenCentral() + /* + add this repository to pick up the SNAPSHOT version of the IVOA base library - in the future when this + will not be necessary when this library is released as a non-SNAPSHOT version. + */ + maven { + url= uri("https://oss.sonatype.org/content/repositories/snapshots/") + } + } +} diff --git a/vo-dml/coord.vodml-binding.xml b/vo-dml/coord.vodml-binding.xml new file mode 100644 index 0000000..8d94437 --- /dev/null +++ b/vo-dml/coord.vodml-binding.xml @@ -0,0 +1,11 @@ + + + + +coords +Coords-v1.0.vo-dml.xml + org.ivoa.dm.stc.coords +http://ivoa.net/dm/models/vo-dml/xsd/stc/coords/ + +