From 57bc9d6766a73b5ed9b30f1bebb5a923cd213320 Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 28 Jan 2025 09:43:33 +0000 Subject: [PATCH 01/13] test: test publish-android workflow --- .github/workflows/publish-android.yml | 6 +++++- scripts/publish-android.sh | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-android.yml b/.github/workflows/publish-android.yml index 147245e..adc9f45 100644 --- a/.github/workflows/publish-android.yml +++ b/.github/workflows/publish-android.yml @@ -1,6 +1,10 @@ name: Publish Native Android Library -on: workflow_dispatch +#on: workflow_dispatch +on: + workflow_dispatch: + push: + branches: [test-publish-android] jobs: publish-android: diff --git a/scripts/publish-android.sh b/scripts/publish-android.sh index 0067146..fd3aacc 100755 --- a/scripts/publish-android.sh +++ b/scripts/publish-android.sh @@ -20,8 +20,10 @@ else export SHOULD_PUBLISH=true printf %"s\n" "Attempting to build and publish version $THE_VERSION" - "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 - # "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 + # Publish a release to the Maven repo + # "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 + # Stage a version + "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 echo $RESULT From 2b9ee9b4ee5357b7989afa79bbc14fab732b7a4a Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 28 Jan 2025 09:51:19 +0000 Subject: [PATCH 02/13] test: raise version just to test --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f819be6..13fddd5 100644 --- a/pom.xml +++ b/pom.xml @@ -6,5 +6,5 @@ 4.0.0 com.github.outsystems osinappbrowser-android - 1.2.1 + 1.2.1.1 From 7ae78bc0cfd09ec665379645ef52da8bc72d03b9 Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 28 Jan 2025 10:01:13 +0000 Subject: [PATCH 03/13] refactor: change namespace of Maven library to io.ionic.libs --- pom.xml | 2 +- scripts/publish-android.sh | 2 +- scripts/publish-module.gradle | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 13fddd5..f819be6 100644 --- a/pom.xml +++ b/pom.xml @@ -6,5 +6,5 @@ 4.0.0 com.github.outsystems osinappbrowser-android - 1.2.1.1 + 1.2.1 diff --git a/scripts/publish-android.sh b/scripts/publish-android.sh index fd3aacc..660b5ef 100755 --- a/scripts/publish-android.sh +++ b/scripts/publish-android.sh @@ -5,7 +5,7 @@ LOG_OUTPUT=./tmp/publish-android.txt THE_VERSION=`sed -n 's/.*\(.*\)<\/version>.*/\1/p' ../pom.xml` # Get latest io.ionic:portals XML version info -PUBLISHED_URL="https://repo1.maven.org/maven2/com/capacitorjs/osinappbrowser-android/maven-metadata.xml" +PUBLISHED_URL="https://repo1.maven.org/maven2/io/ionic/libs/osinappbrowser-android/maven-metadata.xml" PUBLISHED_DATA=$(curl -s $PUBLISHED_URL) PUBLISHED_VERSION="$(perl -ne 'print and last if s/.*(.*)<\/latest>.*/\1/;' <<< $PUBLISHED_DATA)" diff --git a/scripts/publish-module.gradle b/scripts/publish-module.gradle index d54ab16..957cf86 100644 --- a/scripts/publish-module.gradle +++ b/scripts/publish-module.gradle @@ -18,7 +18,7 @@ artifacts { archives androidSourcesJar } -group = 'com.capacitorjs' +group = 'io.ionic.libs' version = LIB_VERSION afterEvaluate { @@ -26,7 +26,7 @@ afterEvaluate { publications { release(MavenPublication) { // Coordinates - groupId 'com.capacitorjs' + groupId 'io.ionic.libs' artifactId 'osinappbrowser-android' version LIB_VERSION From c55ec6b5647be01636affe492f6f5d689762e394 Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 28 Jan 2025 10:10:35 +0000 Subject: [PATCH 04/13] chore: update groupId in pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f819be6..2749bc8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - com.github.outsystems + io.ionic.libs osinappbrowser-android 1.2.1 From 15cc3b05aac54d299018ff3a9b643edb3b753dc9 Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 28 Jan 2025 10:15:40 +0000 Subject: [PATCH 05/13] test: test publish-android --- .github/workflows/publish-android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-android.yml b/.github/workflows/publish-android.yml index adc9f45..25cc81d 100644 --- a/.github/workflows/publish-android.yml +++ b/.github/workflows/publish-android.yml @@ -4,7 +4,7 @@ name: Publish Native Android Library on: workflow_dispatch: push: - branches: [test-publish-android] + branches: [ test-publish-android ] jobs: publish-android: From 0a6e330608aff2c57ca30b735f84927e0c69cdc9 Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 28 Jan 2025 11:34:21 +0000 Subject: [PATCH 06/13] test: test publish-android --- .github/workflows/publish-android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-android.yml b/.github/workflows/publish-android.yml index 25cc81d..adc9f45 100644 --- a/.github/workflows/publish-android.yml +++ b/.github/workflows/publish-android.yml @@ -4,7 +4,7 @@ name: Publish Native Android Library on: workflow_dispatch: push: - branches: [ test-publish-android ] + branches: [test-publish-android] jobs: publish-android: From 45d921a11c902ed914dc94fa6515e44841e3b02d Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 28 Jan 2025 11:41:43 +0000 Subject: [PATCH 07/13] chore: remove unnecessary environment variables --- .github/workflows/publish-android.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/publish-android.yml b/.github/workflows/publish-android.yml index adc9f45..fb40ac4 100644 --- a/.github/workflows/publish-android.yml +++ b/.github/workflows/publish-android.yml @@ -36,11 +36,4 @@ jobs: echo "local.properties file has been created successfully." - name: Run publish script working-directory: ./scripts - env: - ANDROID_OSSRH_USERNAME: ${{ secrets.ANDROID_OSSRH_USERNAME }} - ANDROID_OSSRH_PASSWORD: ${{ secrets.ANDROID_OSSRH_PASSWORD }} - ANDROID_SIGNING_KEY_ID: ${{ secrets.ANDROID_SIGNING_KEY_ID }} - ANDROID_SIGNING_PASSWORD: ${{ secrets.ANDROID_SIGNING_PASSWORD }} - ANDROID_SIGNING_KEY: ${{ secrets.ANDROID_SIGNING_KEY }} - ANDROID_SONATYPE_STAGING_PROFILE_ID: ${{ secrets.ANDROID_SONATYPE_STAGING_PROFILE_ID }} run: ./publish-android.sh \ No newline at end of file From 1832836abd8e98545c77eb92a78e3f1e0001ebf7 Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 28 Jan 2025 12:08:27 +0000 Subject: [PATCH 08/13] chore: set workflow to run only on manual trigger --- .github/workflows/publish-android.yml | 6 +----- scripts/publish-android.sh | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-android.yml b/.github/workflows/publish-android.yml index fb40ac4..c5dd721 100644 --- a/.github/workflows/publish-android.yml +++ b/.github/workflows/publish-android.yml @@ -1,10 +1,6 @@ name: Publish Native Android Library -#on: workflow_dispatch -on: - workflow_dispatch: - push: - branches: [test-publish-android] +on: workflow_dispatch jobs: publish-android: diff --git a/scripts/publish-android.sh b/scripts/publish-android.sh index 660b5ef..6c66607 100755 --- a/scripts/publish-android.sh +++ b/scripts/publish-android.sh @@ -21,9 +21,9 @@ else printf %"s\n" "Attempting to build and publish version $THE_VERSION" # Publish a release to the Maven repo - # "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 + "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 # Stage a version - "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 + # "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 echo $RESULT From 454967ebd702ee4a828deee4f9743419dac16c9a Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 28 Jan 2025 12:23:05 +0000 Subject: [PATCH 09/13] temp: set workflow to run on push to branch to have staging version published --- .github/workflows/publish-android.yml | 6 +++++- scripts/publish-android.sh | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-android.yml b/.github/workflows/publish-android.yml index c5dd721..fb40ac4 100644 --- a/.github/workflows/publish-android.yml +++ b/.github/workflows/publish-android.yml @@ -1,6 +1,10 @@ name: Publish Native Android Library -on: workflow_dispatch +#on: workflow_dispatch +on: + workflow_dispatch: + push: + branches: [test-publish-android] jobs: publish-android: diff --git a/scripts/publish-android.sh b/scripts/publish-android.sh index 6c66607..660b5ef 100755 --- a/scripts/publish-android.sh +++ b/scripts/publish-android.sh @@ -21,9 +21,9 @@ else printf %"s\n" "Attempting to build and publish version $THE_VERSION" # Publish a release to the Maven repo - "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 + # "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 # Stage a version - # "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 + "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 echo $RESULT From f463dbd2361cd2c0bff308cb08a28b5190c3cbc9 Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 28 Jan 2025 12:26:11 +0000 Subject: [PATCH 10/13] chore: update CHANGELOG References: https://outsystemsrd.atlassian.net/browse/RMET-3982 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8771192..cf1c06c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +- Update `publish-android` workflow to publish library under io.ionic.libs (https://outsystemsrd.atlassian.net/browse/RMET-3982) + ## 1.2.1 - Remove unnecessary permissions from AndroidManifest (https://outsystemsrd.atlassian.net/browse/RMET-3987) From 5c88053de1737b703f1c2f769bf7da116d47be35 Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 28 Jan 2025 12:35:17 +0000 Subject: [PATCH 11/13] chore: set workflow to run on a manual trigger --- .github/workflows/publish-android.yml | 6 +----- scripts/publish-android.sh | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-android.yml b/.github/workflows/publish-android.yml index fb40ac4..c5dd721 100644 --- a/.github/workflows/publish-android.yml +++ b/.github/workflows/publish-android.yml @@ -1,10 +1,6 @@ name: Publish Native Android Library -#on: workflow_dispatch -on: - workflow_dispatch: - push: - branches: [test-publish-android] +on: workflow_dispatch jobs: publish-android: diff --git a/scripts/publish-android.sh b/scripts/publish-android.sh index 660b5ef..6c66607 100755 --- a/scripts/publish-android.sh +++ b/scripts/publish-android.sh @@ -21,9 +21,9 @@ else printf %"s\n" "Attempting to build and publish version $THE_VERSION" # Publish a release to the Maven repo - # "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 + "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 # Stage a version - "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 + # "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 echo $RESULT From 25fc7d0ef3b9b9ede60a9fd4c60faf6a939de19b Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 28 Jan 2025 12:38:02 +0000 Subject: [PATCH 12/13] refactor: set library name on maven to `ioninappbrowser-android` --- .github/workflows/publish-android.yml | 6 +++++- pom.xml | 2 +- scripts/publish-android.sh | 6 +++--- scripts/publish-module.gradle | 4 ++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-android.yml b/.github/workflows/publish-android.yml index c5dd721..fb40ac4 100644 --- a/.github/workflows/publish-android.yml +++ b/.github/workflows/publish-android.yml @@ -1,6 +1,10 @@ name: Publish Native Android Library -on: workflow_dispatch +#on: workflow_dispatch +on: + workflow_dispatch: + push: + branches: [test-publish-android] jobs: publish-android: diff --git a/pom.xml b/pom.xml index 2749bc8..93f52b9 100644 --- a/pom.xml +++ b/pom.xml @@ -5,6 +5,6 @@ 4.0.0 io.ionic.libs - osinappbrowser-android + ioninappbrowser-android 1.2.1 diff --git a/scripts/publish-android.sh b/scripts/publish-android.sh index 6c66607..3e1908a 100755 --- a/scripts/publish-android.sh +++ b/scripts/publish-android.sh @@ -5,7 +5,7 @@ LOG_OUTPUT=./tmp/publish-android.txt THE_VERSION=`sed -n 's/.*\(.*\)<\/version>.*/\1/p' ../pom.xml` # Get latest io.ionic:portals XML version info -PUBLISHED_URL="https://repo1.maven.org/maven2/io/ionic/libs/osinappbrowser-android/maven-metadata.xml" +PUBLISHED_URL="https://repo1.maven.org/maven2/io/ionic/libs/ioninappbrowser-android/maven-metadata.xml" PUBLISHED_DATA=$(curl -s $PUBLISHED_URL) PUBLISHED_VERSION="$(perl -ne 'print and last if s/.*(.*)<\/latest>.*/\1/;' <<< $PUBLISHED_DATA)" @@ -21,9 +21,9 @@ else printf %"s\n" "Attempting to build and publish version $THE_VERSION" # Publish a release to the Maven repo - "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 + # "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 # Stage a version - # "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 + "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 echo $RESULT diff --git a/scripts/publish-module.gradle b/scripts/publish-module.gradle index 957cf86..ac5c532 100644 --- a/scripts/publish-module.gradle +++ b/scripts/publish-module.gradle @@ -27,7 +27,7 @@ afterEvaluate { release(MavenPublication) { // Coordinates groupId 'io.ionic.libs' - artifactId 'osinappbrowser-android' + artifactId 'ioninappbrowser-android' version LIB_VERSION // Two artifacts, the `aar` (or `jar`) and the sources @@ -41,7 +41,7 @@ afterEvaluate { // POM Data pom { - name = 'osinappbrowser-android' + name = 'ioninappbrowser-android' description = 'InAppBrowser Android Lib' url = 'https://github.com/OutSystems/OSInAppBrowserLib-Android' licenses { From 4c77147f18d9940c71268be2c2708b188d6358ff Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 28 Jan 2025 12:47:08 +0000 Subject: [PATCH 13/13] chore: set workflow to run on manual trigger --- .github/workflows/publish-android.yml | 6 +----- scripts/publish-android.sh | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-android.yml b/.github/workflows/publish-android.yml index fb40ac4..c5dd721 100644 --- a/.github/workflows/publish-android.yml +++ b/.github/workflows/publish-android.yml @@ -1,10 +1,6 @@ name: Publish Native Android Library -#on: workflow_dispatch -on: - workflow_dispatch: - push: - branches: [test-publish-android] +on: workflow_dispatch jobs: publish-android: diff --git a/scripts/publish-android.sh b/scripts/publish-android.sh index 3e1908a..d44308d 100755 --- a/scripts/publish-android.sh +++ b/scripts/publish-android.sh @@ -21,9 +21,9 @@ else printf %"s\n" "Attempting to build and publish version $THE_VERSION" # Publish a release to the Maven repo - # "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 + "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 # Stage a version - "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 + # "$ANDROID_PATH"/gradlew clean build publishReleasePublicationToSonatypeRepository --no-daemon --max-workers 1 -b "$ANDROID_PATH"/build.gradle -Pandroid.useAndroidX=true > $LOG_OUTPUT 2>&1 echo $RESULT