Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ui-android-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,7 @@ jobs:
env:
MEWMBA_GIT_PUBLISH_TOKEN: ${{ secrets.MEWMBA_GIT_PUBLISH_TOKEN }}
SDK_REPOSITORY_PATH: ${{ github.repository }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_PUBLISHING_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PUBLISHING_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MAVEN_CENTRAL_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.MAVEN_CENTRAL_SIGNING_KEY_PASSWORD }}
3 changes: 2 additions & 1 deletion ui-android/build-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ source "$REPO_ROOT/helpers/common.sh"
cd "$SCRIPT_DIR/sdk"
./gradlew :library:build

# Update package version in gradle build file
package_version="$(get_version androidUIVersion)"
gradle_path="./library/build.gradle.kts"
perl -0pi -e "s/\\n\\s+version = \"[^\"]+\"/\\n version = \"$package_version\"/" "$gradle_path"
NEW_VERSION="$package_version" perl -0pi -e 's/(coordinates\(\s*"id\.trinsic"\s*,\s*"sdk-android-ui"\s*,\s*")[^"]*(")/$1$ENV{NEW_VERSION}$2/g' $gradle_path
echo "Gradle file updated with version $package_version."
)
51 changes: 32 additions & 19 deletions ui-android/publish-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ source "$REPO_ROOT/helpers/common.sh"

require_env SDK_REPOSITORY_PATH
require_env MEWMBA_GIT_PUBLISH_TOKEN
require_env ORG_GRADLE_PROJECT_mavenCentralUsername
require_env ORG_GRADLE_PROJECT_mavenCentralPassword
require_env ORG_GRADLE_PROJECT_signingInMemoryKey
require_env ORG_GRADLE_PROJECT_signingInMemoryKeyPassword

# Commit updated build.gradle.kts, tag the commit, and push
(
cd "$SCRIPT_DIR/sdk"

Expand All @@ -23,29 +28,37 @@ require_env MEWMBA_GIT_PUBLISH_TOKEN
git checkout main
git pull

echo "Adding files to git"
git add .
# echo "Adding files to git"
# git add .

package_version="$(get_version androidUIVersion)"
# package_version="$(get_version androidUIVersion)"

echo "Committing files"
git commit -m "Publishing latest ui-android package for version $package_version"
# echo "Committing files"
# git commit -m "Publishing latest ui-android package for version $package_version"

echo "Pushing to submodule repository"
git push origin main
# echo "Pushing to submodule repository"
# git push origin main

tag_name="$package_version"
git tag "$tag_name"
git push origin "$tag_name"
# Don't tag so we don't trigger Jitpack (testing)
# tag_name="$package_version"
# git tag "$tag_name"
# git push origin "$tag_name"
)

(
cd "$REPO_ROOT"
remote_origin="https://$MEWMBA_GIT_PUBLISH_TOKEN@github.com/$SDK_REPOSITORY_PATH.git"
echo "Setting origin to $remote_origin"
git remote set-url origin "$remote_origin"
# Push updated submodule ref to root repo
# (
# cd "$REPO_ROOT"
# remote_origin="https://$MEWMBA_GIT_PUBLISH_TOKEN@github.com/$SDK_REPOSITORY_PATH.git"
# echo "Setting origin to $remote_origin"
# git remote set-url origin "$remote_origin"

git add "ui-android/sdk"
git commit -m "Update ui-android submodule reference to version $(get_version androidUIVersion)"
git push origin main
)
# git add "ui-android/sdk"
# git commit -m "Update ui-android submodule reference to version $(get_version androidUIVersion)"
# git push origin main
# )

# Publish to Maven
(
cd "$SCRIPT_DIR/sdk"
./gradlew publishToMavenCentral
)
2 changes: 1 addition & 1 deletion ui-android/samples/android_sample/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ dependencies {
testImplementation(libs.junit)
androidTestImplementation(libs.ext.junit)
androidTestImplementation(libs.espresso.core)
implementation("com.github.trinsic-id:sdk-android-ui:2.1.0-alpha1")
implementation("id.trinsic:sdk-android-ui:2.1.0-alpha2")
}
3 changes: 0 additions & 3 deletions ui-android/samples/android_sample/settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven {
url = URI("https://jitpack.io")
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"phpPatchVersion": "0-preview1",
"rubyPatchVersion": "0-preview1",
"swiftUIVersion": "2.1.0-alpha4",
"androidUIVersion": "2.1.0-alpha1",
"androidUIVersion": "2.1.0",
"flutterUIVersion": "2.0.0",
"expoUIVersion": "2.0.1",
"webUIVersion": "3.0.3"
Expand Down
Loading