Skip to content

Commit

Permalink
Merge branch 'feature/mdl-cbor' into feature/mdl-cbor-serializer-cert…
Browse files Browse the repository at this point in the history
…ificates
  • Loading branch information
JesusMcCloud committed Aug 22, 2023
2 parents 042dac2 + a7ad101 commit 26edfde
Show file tree
Hide file tree
Showing 26 changed files with 239 additions and 117 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ jobs:
with:
distribution: 'temurin'
java-version: '11'
- name: Build kotlinx.serialization
run: ./gradlew publishToMavenLocal
working-directory: kotlinx.serialization
- name: Build klibs
run: ./gradlew iosArm64MainKlibrary iosX64MainKlibrary
- name: Build XCFrameworks
run: ./gradlew assembleVcLibKmmXCFramework assembleVcLibAriesKmmXCFramework assembleVcLibOpenIdKmmXCFramework
- name: Upload debug XCFramework vclib
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/build-jvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build kotlinx.serialization
run: ./gradlew build :build -x :kotlinx-serialization-cbor:animalsnifferMain -x :kotlinx-serialization-cbor:jvmApiCheck -x :kotlinx-serialization-cbor:jsLegacyNode publishToMavenLocal
working-directory: kotlinx.serialization
- name: Build jar
run: ./gradlew assemble
- name: Upload jar vclib
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/publish-dry-run.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish Dry Run
on: workflow_dispatch
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Publish to Maven Local
run: ./gradlew clean publishToMavenLocal
env:
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.PUBLISH_SIGNING_KEYID }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.PUBLISH_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.PUBLISH_SIGNING_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.PUBLISH_SONATYPE_USER }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.PUBLISH_SONATYPE_PASSWORD }}
deploy-docs:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build Dokka HTML
run: ./gradlew dokkaHtmlMultiModule
3 changes: 0 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ jobs:
with:
distribution: 'temurin'
java-version: '11'
- name: Build kotlinx.serialization
run: ./gradlew publishToMavenLocal
working-directory: kotlinx.serialization
- name: Publish to Sonatype
run: ./gradlew clean publishToSonatype closeSonatypeStagingRepository
env:
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
url = https://github.com/a-sit-plus/gradle-conventions-plugin.git
[submodule "kotlinx.serialization"]
path = kotlinx.serialization
url = git@github.com:a-sit-plus/kotlinx.serialization.git
url = https://github.com/a-sit-plus/kotlinx.serialization.git
12 changes: 11 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
import org.jetbrains.dokka.gradle.DokkaMultiModuleTask

plugins {
id("at.asitplus.gradle.vclib-conventions")
}

//access dokka plugin from conventions plugin's classpath in root project → no need to specify version
apply(plugin = "org.jetbrains.dokka")
tasks.getByName("dokkaHtmlMultiModule") {
(this as DokkaMultiModuleTask)
outputDirectory.set(File("$buildDir/dokka"))
includes.from("README.md")
}

task<Exec>("purge") {
dependsOn("clean")
workingDir = layout.projectDirectory.dir("vclib").asFile
Expand All @@ -14,4 +24,4 @@ task<Exec>("purge") {

val artifactVersion: String by extra
group = "at.asitplus.wallet"
version = artifactVersion
version = artifactVersion
5 changes: 5 additions & 0 deletions conventions-vclib/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ dependencies {
}

repositories {
maven("https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev")
mavenCentral()
gradlePluginPortal()
}
kotlin {
jvmToolchain {
(this as JavaToolchainSpec).languageVersion.set(JavaLanguageVersion.of(11/*TODO share*/))
}
/*compilerOptions {
languageVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_9)
apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_9)
}*/
}

gradlePlugin {
Expand Down
Binary file modified conventions-vclib/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion conventions-vclib/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
16 changes: 10 additions & 6 deletions conventions-vclib/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum

Expand Down Expand Up @@ -133,26 +130,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@ kotlin.mpp.stability.nowarn=true
kotlin.native.binary.memoryModel=experimental
kotlin.native.binary.freezing=disabled
kotlin.native.ignoreDisabledTargets=true
kotlin.experimental.tryK2=false

# workaround dokka bug (need to wait for next snapshot build)
org.jetbrains.dokka.classpath.excludePlatformDependencyFiles=true

artifactVersion = 2.1.0-SNAPSHOT
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
19 changes: 12 additions & 7 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -133,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -197,6 +198,10 @@ if "$cygwin" || "$msys" ; then
done
fi


# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
2 changes: 1 addition & 1 deletion kotlinx.serialization
Submodule kotlinx.serialization updated 88 files
+32 −0 CHANGELOG.md
+4 −4 CONTRIBUTING.md
+13 −13 README.md
+131 −40 buildSrc/src/main/kotlin/Java9Modularity.kt
+4 −0 core/api/kotlinx-serialization-core.api
+0 −6 core/build.gradle
+1 −1 core/commonMain/src/kotlinx/serialization/builtins/BuiltinSerializers.kt
+15 −0 core/commonMain/src/kotlinx/serialization/internal/NamedCompanion.kt
+5 −5 core/commonTest/src/kotlinx/serialization/CachedSerializersTest.kt
+0 −2 core/commonTest/src/kotlinx/serialization/InheritableSerialInfoTest.kt
+3 −3 core/commonTest/src/kotlinx/serialization/MetaSerializableTest.kt
+0 −2 core/commonTest/src/kotlinx/serialization/SerialDescriptorAnnotationsTest.kt
+3 −15 core/commonTest/src/kotlinx/serialization/SerializersLookupEnumTest.kt
+1 −2 core/commonTest/src/kotlinx/serialization/SerializersLookupInterfaceTest.kt
+100 −0 core/commonTest/src/kotlinx/serialization/SerializersLookupNamedCompanionTest.kt
+3 −10 core/commonTest/src/kotlinx/serialization/SerializersLookupObjectTest.kt
+25 −1 core/commonTest/src/kotlinx/serialization/SerializersModuleTest.kt
+1 −1 core/commonTest/src/kotlinx/serialization/features/SealedInterfacesSerializationTest.kt
+180 −0 core/commonTest/src/kotlinx/serialization/test/CompilerVersions.kt
+2 −4 core/commonTest/src/kotlinx/serialization/test/CurrentPlatform.common.kt
+0 −4 core/commonTest/src/kotlinx/serialization/test/TestHelpers.kt
+5 −2 core/jsMain/src/kotlinx/serialization/internal/Platform.kt
+1 −6 core/jsTest/src/kotlinx/serialization/test/CurrentPlatform.kt
+34 −12 core/jvmMain/src/kotlinx/serialization/internal/Platform.kt
+1 −1 docs/building.md
+4 −4 docs/value-classes.md
+12 −2 dokka/moduledoc.md
+8 −7 formats/README.md
+15 −0 formats/json-okio/build.gradle.kts
+550 −0 formats/json-okio/dokka/okio.package.list
+0 −1 formats/json-okio/gradle.properties
+0 −8 formats/json-tests/build.gradle.kts
+1 −2 formats/json-tests/commonTest/src/kotlinx/serialization/SerializableOnPropertyTypeAndTypealiasTest.kt
+0 −4 formats/json-tests/commonTest/src/kotlinx/serialization/SerializerForNullableTypeTest.kt
+9 −11 formats/json-tests/commonTest/src/kotlinx/serialization/SerializersLookupTest.kt
+8 −5 formats/json-tests/commonTest/src/kotlinx/serialization/features/JsonClassDiscriminatorTest.kt
+10 −11 formats/json-tests/commonTest/src/kotlinx/serialization/features/JsonEnumsCaseInsensitiveTest.kt
+4 −4 formats/json-tests/commonTest/src/kotlinx/serialization/features/JsonNamesTest.kt
+3 −3 formats/json-tests/commonTest/src/kotlinx/serialization/features/JsonNamingStrategyTest.kt
+11 −22 formats/json-tests/commonTest/src/kotlinx/serialization/features/LocalClassesTest.kt
+1 −1 formats/json-tests/commonTest/src/kotlinx/serialization/features/PolymorphicOnClassesTest.kt
+38 −0 formats/json-tests/commonTest/src/kotlinx/serialization/features/PolymorphismTest.kt
+1 −2 formats/json-tests/commonTest/src/kotlinx/serialization/features/SkipDefaults.kt
+2 −2 formats/json-tests/commonTest/src/kotlinx/serialization/features/inline/EncodeInlineElementTest.kt
+9 −9 formats/json-tests/commonTest/src/kotlinx/serialization/features/inline/InlineClassesCompleteTest.kt
+10 −10 formats/json-tests/commonTest/src/kotlinx/serialization/features/inline/InlineClassesTest.kt
+2 −2 formats/json-tests/commonTest/src/kotlinx/serialization/features/inline/InlineMapQuotedTest.kt
+8 −4 formats/json-tests/commonTest/src/kotlinx/serialization/features/inline/ValueClassesInSealedHierarchyTest.kt
+1 −1 ...ts/json-tests/commonTest/src/kotlinx/serialization/features/sealed/SealedInterfacesJsonSerializationTest.kt
+5 −7 formats/json-tests/commonTest/src/kotlinx/serialization/json/JsonMapKeysTest.kt
+4 −6 formats/json-tests/commonTest/src/kotlinx/serialization/json/JsonModesTest.kt
+0 −43 formats/json-tests/commonTest/src/kotlinx/serialization/test/CompilerVersions.kt
+2 −3 formats/json-tests/commonTest/src/kotlinx/serialization/test/CurrentPlatform.common.kt
+0 −4 formats/json-tests/commonTest/src/kotlinx/serialization/test/TestHelpers.kt
+1 −2 formats/json-tests/jsTest/src/kotlinx/serialization/json/DynamicPolymorphismTest.kt
+4 −4 formats/json-tests/jsTest/src/kotlinx/serialization/json/JsonNamesDynamicTest.kt
+1 −6 formats/json-tests/jsTest/src/kotlinx/serialization/test/CurrentPlatform.kt
+1 −0 formats/json/api/kotlinx-serialization-json.api
+1 −1 formats/json/commonMain/src/kotlinx/serialization/json/internal/StreamingJsonDecoder.kt
+5 −1 formats/json/commonMain/src/kotlinx/serialization/json/internal/lexer/AbstractJsonLexer.kt
+1 −1 formats/json/commonMain/src/kotlinx/serialization/json/internal/lexer/JsonLexer.kt
+9 −10 formats/json/commonMain/src/kotlinx/serialization/json/internal/lexer/StringJsonLexer.kt
+0 −10 formats/json/jsMain/src/kotlinx/serialization/json/internal/FormatLanguage.kt
+25 −0 formats/json/jsMain/src/kotlinx/serialization/json/internal/FormatLanguageJs.kt
+0 −35 formats/json/jsMain/src/kotlinx/serialization/json/internal/IntelliJAnnotation.kt
+0 −0 formats/json/jsMain/src/kotlinx/serialization/json/internal/JsonToStringWriterJs.kt
+2 −15 formats/json/jvmMain/src/kotlinx/serialization/json/internal/CharsetReader.kt
+2 −0 formats/json/nativeMain/src/kotlinx/serialization/json/JsonSchemaCache.kt
+16 −1 formats/json/nativeMain/src/kotlinx/serialization/json/internal/FormatLanguage.kt
+0 −35 formats/json/nativeMain/src/kotlinx/serialization/json/internal/IntelliJAnnotation.kt
+1 −0 formats/protobuf/api/kotlinx-serialization-protobuf.api
+24 −17 formats/protobuf/commonMain/src/kotlinx/serialization/protobuf/ProtoBuf.kt
+4 −5 formats/protobuf/commonMain/src/kotlinx/serialization/protobuf/ProtoTypes.kt
+29 −0 formats/protobuf/commonTest/src/kotlinx/serialization/protobuf/ProtobufNothingTest.kt
+0 −3 formats/protobuf/commonTest/src/kotlinx/serialization/protobuf/ProtobufNullAndDefaultTest.kt
+3 −3 formats/protobuf/commonTest/src/kotlinx/serialization/test/CurrentPlatform.common.kt
+1 −6 formats/protobuf/jsTest/src/kotlinx/serialization/test/CurrentPlatform.kt
+2 −8 gradle.properties
+39 −0 gradle.properties.orig
+12 −1 gradle/configure-source-sets.gradle
+148 −0 gradle/configure-source-sets.gradle.orig
+7 −0 gradle/dokka.gradle
+3 −0 gradle/publishing.gradle
+1 −1 gradle/teamcity.gradle
+2 −2 integration-test/gradle.properties
+13 −423 integration-test/kotlin-js-store/yarn.lock
+12 −429 kotlin-js-store/yarn.lock
+4 −0 settings.gradle
6 changes: 6 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
pluginManagement {
includeBuild("conventions-vclib")
repositories {
maven("https://maven.pkg.jetbrains.space/kotlin/p/dokka/dev")
google()
gradlePluginPortal()
mavenCentral()
}
}

rootProject.name = "vclibrary"
Expand Down
31 changes: 2 additions & 29 deletions vclib-aries/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import at.asitplus.gradle.bouncycastle
import at.asitplus.gradle.commonImplementationDependencies
import at.asitplus.gradle.commonIosExports
import at.asitplus.gradle.exportIosFramework
import at.asitplus.gradle.*

plugins {
kotlin("multiplatform")
Expand All @@ -16,26 +13,6 @@ val artifactVersion: String by extra
group = "at.asitplus.wallet"
version = artifactVersion

val dokkaOutputDir = "$buildDir/dokka"
tasks.dokkaHtml {
dependsOn(":vclib:transformIosMainCInteropDependenciesMetadataForIde") //task dependency bug workaround
dependsOn(":vclib-openid:transformIosMainCInteropDependenciesMetadataForIde") //task dependency bug workaround
outputDirectory.set(file(dokkaOutputDir))
}
val deleteDokkaOutputDir by tasks.register<Delete>("deleteDokkaOutputDirectory") {
delete(dokkaOutputDir)
}
val javadocJar = tasks.register<Jar>("javadocJar") {
dependsOn(deleteDokkaOutputDir, tasks.dokkaHtml)
archiveClassifier.set("javadoc")
from(dokkaOutputDir)
}

val signingTasks: TaskCollection<Sign> = tasks.withType<Sign>()
tasks.withType<PublishToMavenRepository>().configureEach {
mustRunAfter(signingTasks)
}

exportIosFramework("VcLibAriesKmm", *commonIosExports(), project(":vclib"))
kotlin {

Expand Down Expand Up @@ -64,11 +41,7 @@ kotlin {
}
}

repositories {
mavenLocal()
mavenCentral()
}

val javadocJar = setupDokka(baseUrl = "https://github.com/a-sit-plus/kmm-vc-library/tree/main/", multiModuleDoc = true)

publishing {
publications {
Expand Down
Loading

0 comments on commit 26edfde

Please sign in to comment.