diff --git a/Core/build.gradle b/Core/build.gradle index d0f2bbc..dec3211 100644 --- a/Core/build.gradle +++ b/Core/build.gradle @@ -3,7 +3,7 @@ plugins { } group 'com.scaleoutsoftware.digitaltwin' -version '3.2.1' +version '3.2.2' sourceCompatibility = JavaVersion.VERSION_12 @@ -19,10 +19,21 @@ configurations { archives } -task myJavadocs(type: Javadoc) { +task createJavadocs(type: Javadoc) { source = sourceSets.main.allJava } +task javadocJar(type: Jar, dependsOn: createJavadocs) { + setArchiveClassifier('javadoc') + from javadoc.destinationDir +} + + +task sourcesJar(type: Jar, dependsOn: classes) { + setArchiveClassifier('sources') + from sourceSets.main.allSource +} + jar { manifest { attributes ('Implementation-Title': project.name, @@ -30,4 +41,10 @@ jar { } } +task copyRuntime(type: GradleBuild) { + tasks = ['javadocJar', 'sourcesJar'] +} + +build.finalizedBy copyRuntime + diff --git a/Core/src/main/java/com/scaleoutsoftware/digitaltwin/core/PersistenceProviderType.java b/Core/src/main/java/com/scaleoutsoftware/digitaltwin/core/PersistenceProviderType.java index ce9eb88..ba81125 100644 --- a/Core/src/main/java/com/scaleoutsoftware/digitaltwin/core/PersistenceProviderType.java +++ b/Core/src/main/java/com/scaleoutsoftware/digitaltwin/core/PersistenceProviderType.java @@ -92,6 +92,9 @@ public static PersistenceProviderType fromString(String name) { return DynamoDb; case "Azure Cosmos DB": return CosmosDb; + case "Default": + case "default": + return Unconfigured; default: return null; } @@ -108,6 +111,8 @@ public static PersistenceProviderType fromString(String name) { */ public static PersistenceProviderType fromOrdinal(int ordinal) { switch(ordinal) { + case 0: + return Unconfigured; case 1: return AzureDigitalTwinsService; case 3: diff --git a/Development/build.gradle b/Development/build.gradle index 52bff15..af5bc41 100644 --- a/Development/build.gradle +++ b/Development/build.gradle @@ -18,10 +18,38 @@ repositories { dependencies { implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: '2.20.0' testImplementation group: 'junit', name: 'junit', version: '4.12' - implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.5' + implementation group: 'com.google.code.gson', name: 'gson', version: '2.11.0' // public build configuration //implementation group: 'com.scaleoutsoftware.digitaltwin', name: 'core', version: '3.0.9' // local build configuration implementation fileTree(dir: '..\\Core\\build\\libs\\', include: '*.jar') } + +task createJavadocs(type: Javadoc) { + source = sourceSets.main.allJava + classpath = sourceSets.main.runtimeClasspath +} + +task javadocJar(type: Jar, dependsOn: createJavadocs) { + setArchiveClassifier('javadoc') + from javadoc.destinationDir +} + +task sourcesJar(type: Jar, dependsOn: classes) { + setArchiveClassifier('sources') + from sourceSets.main.allSource +} + +jar { + manifest { + attributes ('Implementation-Title': project.name, + 'Implementation-Version': project.version) + } +} + +task copyRuntime(type: GradleBuild) { + tasks = ['javadocJar', 'sourcesJar'] +} + +build.finalizedBy copyRuntime