From 5dff8d69f269a5a86d9d362224c8c251c0f655d8 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 3 Jan 2023 18:33:50 +0600 Subject: [PATCH 1/4] start 0.4.3 --- CHANGELOG.md | 2 ++ gradle.properties | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b079d1..227d13e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +## 0.4.3 + ## 0.4.2 * `Compose`: `1.2.2` diff --git a/gradle.properties b/gradle.properties index 80be5e6..2d59a31 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,4 +9,4 @@ android.enableJetifier=true # Project data group=dev.inmo -version=0.4.2 +version=0.4.3 From 432a5744b3781f913dde9f5ab62621c1f69c4aa1 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 3 Jan 2023 18:37:01 +0600 Subject: [PATCH 2/4] add opportunity to now show dialog automatically --- CHANGELOG.md | 2 ++ src/jsMain/kotlin/dev/inmo/jsuikit/elements/Dialog.kt | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 227d13e..7139c03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## 0.4.3 +* Add opportunity to now show dialog automatically + ## 0.4.2 * `Compose`: `1.2.2` diff --git a/src/jsMain/kotlin/dev/inmo/jsuikit/elements/Dialog.kt b/src/jsMain/kotlin/dev/inmo/jsuikit/elements/Dialog.kt index 60fe10e..d8f574f 100644 --- a/src/jsMain/kotlin/dev/inmo/jsuikit/elements/Dialog.kt +++ b/src/jsMain/kotlin/dev/inmo/jsuikit/elements/Dialog.kt @@ -36,6 +36,7 @@ fun Dialog( footerAttrsBuilder: AttrBuilderContext? = null, footerBuilder: ContentBuilder? = null, bodyAttrsBuilder: AttrBuilderContext? = null, + autoShow: Boolean = true, bodyBuilder: ContentBuilder ) { Div( @@ -99,7 +100,9 @@ fun Dialog( } htmlElement.addEventListener("hidden", wrapper) - UIKit.modal("#${htmlElement.id}") ?.show() + if (autoShow) { + UIKit.modal("#${htmlElement.id}") ?.show() + } } } } @@ -112,6 +115,7 @@ fun Dialog( hidden: (() -> Unit)? = null, footerBuilder: (@Composable () -> Unit)? = null, attributesCustomizer: AttrBuilderContext = {}, + autoShow: Boolean = true, bodyBuilder: @Composable () -> Unit ) = Dialog( modifiers = modifiers, @@ -130,6 +134,7 @@ fun Dialog( attributesCustomizer = { attributesCustomizer() }, + autoShow = autoShow, bodyBuilder = { bodyBuilder() } From f6bfef4b892a0dfb6883308ea39e18a4fe18b2e1 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 3 Jan 2023 18:38:33 +0600 Subject: [PATCH 3/4] update github workflows --- .github/workflows/build.yml | 15 -------------- .github/workflows/build_and_publish.yml | 26 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 15 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/build_and_publish.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 73fe71d..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: Build - -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: Build with Gradle - run: ./gradlew build diff --git a/.github/workflows/build_and_publish.yml b/.github/workflows/build_and_publish.yml new file mode 100644 index 0000000..94a4067 --- /dev/null +++ b/.github/workflows/build_and_publish.yml @@ -0,0 +1,26 @@ +name: Build + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Rewrite version + run: | + branch="`echo "${{ github.ref }}" | grep -o "[^/]*$"`" + cat gradle.properties | sed -e "s/^version=\([0-9\.]*\)/version=\1-branch_$branch-build${{ github.run_number }}/" > gradle.properties.tmp + rm gradle.properties + mv gradle.properties.tmp gradle.properties + - name: Build with Gradle + run: ./gradlew build + - name: Publish + continue-on-error: true + run: ./gradlew publishAllPublicationsToGiteaRepository + env: + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} From fad48715b45492616fb20eea609deda59db608ca Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Tue, 3 Jan 2023 18:40:53 +0600 Subject: [PATCH 4/4] add gitea to the target repositories --- publish.gradle | 18 ++++++++++++++++++ publish.kpsb | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/publish.gradle b/publish.gradle index d5f379c..6f49589 100644 --- a/publish.gradle +++ b/publish.gradle @@ -38,14 +38,32 @@ publishing { } } repositories { + if (project.hasProperty('GITEA_TOKEN') || System.getenv('GITEA_TOKEN') != null) { + maven { + name = "GITEA" + url = uri("https://git.inmo.dev/api/packages/InsanusMokrassar/maven") + + credentials(HttpHeaderCredentials) { + name = "Authorization" + value = project.hasProperty('GITEA_TOKEN') ? project.property('GITEA_TOKEN') : System.getenv('GITEA_TOKEN') + } + + authentication { + header(HttpHeaderAuthentication) + } + + } + } if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) { maven { name = "sonatype" url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/") + credentials { username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER') password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD') } + } } } diff --git a/publish.kpsb b/publish.kpsb index 18c674d..874070a 100644 --- a/publish.kpsb +++ b/publish.kpsb @@ -1 +1 @@ -{"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://opensource.org/licenses/Apache-2.0"}],"mavenConfig":{"name":"${project.name}","description":"${project.name}","url":"https://github.com/InsanusMokrassar/JSUIKitKBindings","vcsUrl":"https://github.com/InsanusMokrassar/JSUIKitKBindings.git","developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}],"repositories":[{"name":"sonatype","url":"https://oss.sonatype.org/service/local/staging/deploy/maven2/"}],"gpgSigning":{"type":"dev.inmo.kmppscriptbuilder.core.models.GpgSigning.Optional"}}} \ No newline at end of file +{"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://opensource.org/licenses/Apache-2.0"}],"mavenConfig":{"name":"${project.name}","description":"${project.name}","url":"https://github.com/InsanusMokrassar/JSUIKitKBindings","vcsUrl":"https://github.com/InsanusMokrassar/JSUIKitKBindings.git","developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}],"repositories":[{"name":"GITEA","url":"https://git.inmo.dev/api/packages/InsanusMokrassar/maven","credsType":{"type":"dev.inmo.kmppscriptbuilder.core.models.MavenPublishingRepository.CredentialsType.HttpHeaderCredentials","headerName":"Authorization","headerValueProperty":"GITEA_TOKEN"}},{"name":"sonatype","url":"https://oss.sonatype.org/service/local/staging/deploy/maven2/"}],"gpgSigning":{"type":"dev.inmo.kmppscriptbuilder.core.models.GpgSigning.Optional"}}} \ No newline at end of file