diff --git a/gitrest/build.gradle b/gitrest/build.gradle index c217a14475a623480e817f6dd352519203df60f7..2410578f91cd66959bb01b3bdb0db8a5470be4d1 100644 --- a/gitrest/build.gradle +++ b/gitrest/build.gradle @@ -2,8 +2,8 @@ apply plugin: "com.android.library" apply plugin: "kotlin-multiplatform" apply plugin: "kotlinx-serialization" -def libraryVersion = "0.0.7" -def libraryVersionCode = 7 +def libraryVersion = "0.0.8" +def libraryVersionCode = 8 apply plugin: 'maven-publish' group 'gitrest' diff --git a/npm/package.json b/npm/package.json index 22ee68845266b328fea2f5795f47dec843cec092..ca8d01e7f0f83e563df4a8295ec393edd3d7a0f5 100644 --- a/npm/package.json +++ b/npm/package.json @@ -1,6 +1,6 @@ { "name": "git-rest-wrapper", - "version": "0.0.7", + "version": "0.0.8", "description": "A \"universal\" / normalized API wrapper for common git hosting services.", "main": "index.js", "files": [ @@ -22,26 +22,26 @@ "homepage": "https://code.horrific.dev/james/git-rest-wrapper#user-content-git-rest-api-wrapper", "dependencies": { "abort-controller": "^3.0.0", - "node-fetch": "^2.6.0", - "text-encoding": "^0.7.0", - "node-persist": "^3.1.0" + "node-fetch": "^2.6.1", + "node-persist": "^3.1.0", + "text-encoding": "^0.7.0" }, "bundledDependencies": [ "kotlin", - "kotlin-source-map-loader", "kotlin-test", "kotlin-test-js-runner", "kotlinx-atomicfu", "kotlinx-coroutines-core", "kotlinx-html-js", - "kotlinx-serialization-kotlinx-serialization-runtime", - "ktor-ktor-client-core", - "ktor-ktor-client-js", - "ktor-ktor-client-json", - "ktor-ktor-client-serialization", - "ktor-ktor-http", - "ktor-ktor-http-cio", - "ktor-ktor-io", - "ktor-ktor-utils" + "kotlinx-serialization-kotlinx-serialization-core-jsLegacy", + "kotlinx-serialization-kotlinx-serialization-json-jsLegacy", + "ktor-ktor-client-core-jsLegacy", + "ktor-ktor-client-js-jsLegacy", + "ktor-ktor-client-json-jsLegacy", + "ktor-ktor-client-serialization-jsLegacy", + "ktor-ktor-http-cio-jsLegacy", + "ktor-ktor-http-jsLegacy", + "ktor-ktor-io-jsLegacy", + "ktor-ktor-utils-jsLegacy" ] } diff --git a/npm/publish.sh b/npm/publish.sh index f80e291fd07b74d7169824d4aa09da382f663d16..a7bff584b5671a2b89c27d2895e207e44c88c493 100644 --- a/npm/publish.sh +++ b/npm/publish.sh @@ -1,6 +1,11 @@ #!/bin/bash set -e +# Update version number in package.json (to match build.gradle def) +PACKAGE_VERSION=$( cd .. && ./gradlew :gitrest:properties | grep -oP '(?<=^version: )[0-9\.]+' ) +PACKAGE_JSON=$(jq --arg version "$PACKAGE_VERSION" '.version = $version' package.json) +echo "$PACKAGE_JSON" > package.json + # Build JS file (ignore browser tests...) ( cd .. && ./gradlew :gitrest:build -x :gitrest:jsBrowserTest ) @@ -29,7 +34,7 @@ install_bundled_packages # Update 'bundledDependencies' value in package.json PACKAGE_DEPENDENCIES=$(echo "${BUNDLE_PACKAGES[@]}" | jq -s '.') PACKAGE_JSON=$(jq --argjson dependencies "$PACKAGE_DEPENDENCIES" '.bundledDependencies = $dependencies' package.json) -echo $PACKAGE_JSON > package.json +echo "$PACKAGE_JSON" > package.json # Install regular NPM dependencies for testing NPM_PACKAGES=$(jq '.dependencies | to_entries | map("\(.key)@\(.value|tostring)") | .[]' package.json)