Skip to content

Commit

Permalink
Use CI to publish (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruixhuang authored Jul 19, 2023
1 parent b0f50ad commit 13905fd
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 20 deletions.
6 changes: 3 additions & 3 deletions cartera/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
// implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'

implementation 'com.google.code.gson:gson:2.9.0'

//
// https://github.com/WalletConnect/WalletConnectKotlinV2
//

implementation platform('com.walletconnect:android-bom:1.10.0')
implementation platform('com.walletconnect:android-bom:1.13.1')
implementation('com.walletconnect:android-core')
implementation 'com.walletconnect:sign'
implementation 'com.walletconnect:push'
Expand All @@ -87,7 +87,7 @@ publishing {
maven(MavenPublication) {
groupId "dydxprotocol"
artifactId "cartera-android"
version "0.0.4"
version "0.0.5"
artifact sourceJar
artifact "$buildDir/outputs/aar/cartera-release.aar"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package exchange.dydx.cartera.typeddata
class EIP712DomainTypedDataProvider(
private val name: String,
private val chainId: Int,
private val version: String = "1.0.0"
private val version: String? = null
) : WalletTypedDataProviderProtocol {
var eip712: EIP712TypedData? = null
var message: WalletTypedData? = null

init {
eip712 = EIP712TypedData(name, chainId, null)
eip712 = EIP712TypedData(name, chainId, version)
}

override fun typedData(): Map<String, Any>? {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class WalletConnectV2Provider(
description = walletConnectV2Config.clientDescription,
url = walletConnectV2Config.clientUrl,
icons = walletConnectV2Config.iconUrls,
redirect = "kotlin-dapp-wc:/request"
redirect = "exchange.dydx.carteraexample"
)

CoreClient.initialize(
Expand Down
14 changes: 0 additions & 14 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/bin/sh

# search for the first line that starts with "version" in cartera/ build.gradle
# get the value in the quotes
VERSION=$(grep "^ version" cartera/build.gradle | sed -n 's/ version "\(.*\)"/\1/p')


echo "Current version is $VERSION. Enter new version (or press enter to skip):"
read NEW_VERSION

#if NEW_VERSION is not empty, replace the version in build.gradle
if [ ! -z "$NEW_VERSION" ]; then
echo "Updating version to $NEW_VERSION"
sed -i '' "s/version \"$VERSION\"/version \"$NEW_VERSION\"/" cartera/build.gradle
fi

./gradlew clean assembleRelease
./gradlew publish
16 changes: 16 additions & 0 deletions update_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

# search for the first line that starts with "version" in cartera/ build.gradle
# get the value in the quotes
VERSION=$(grep "^ version" cartera/build.gradle | sed -n 's/ version "\(.*\)"/\1/p')


echo "Current version is $VERSION. Enter new version (or press enter to skip):"
read NEW_VERSION

#if NEW_VERSION is not empty, replace the version in build.gradle
if [ ! -z "$NEW_VERSION" ]; then
echo "Updating version to $NEW_VERSION"
sed -i '' "s/version \"$VERSION\"/version \"$NEW_VERSION\"/" cartera/build.gradle
fi

0 comments on commit 13905fd

Please sign in to comment.