cianru / rustore-publish-gradle-plugin

RuStore Gradle Plugin that allows you to publish the android APK build file to the RuStore.
Apache License 2.0
35 stars 6 forks source link

Support of AAB files #9

Closed cosic closed 2 months ago

cosic commented 4 months ago

Appeared corresponding API in the Documentation https://www.rustore.ru/help/work-with-rustore-api/api-upload-publication-app/apk-file-upload/file-upload-aab Now we can support this feature.

dev-gvs commented 2 months ago

When this is planned to be released?

I see it's in snapshot-0.5.0 branch, but there's no release or snapshot version for it :thinking:

cosic commented 2 months ago

@dev-gvs Hi! Actually that's great you've asked about. I need your help. When I try to use RuStore API to upload aab file I've got the error:

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:publishRustoreRelease'.
> Build file uploading is failed! Reason code: ERROR, message: Jwe token is expired

The Rustore support team told me about connection problem from my side. But my collegues get the same error from different locations and internet providers.

We need to try an other project to get a proofs. If you are ready to try than just

  1. update the plugin upto 0.5.0-alpha01 version

  2. add a new row to the plugin extention

    configure<ru.cian.rustore.publish.RustorePublishExtension> {
        instances {
            register("release") {
                ...
                buildFormat = ru.cian.rustore.publish.BuildFormat.AAB // <-- that one! 
                requestTimeout = 1800 // <-- and this one, which equals to 30min;
                ....
            }
        }
    }
  1. Upload you keystore into RuStore Console via Web interface.

  2. Build AAB file

    ./gradlew bundleRelease
  3. Publish file

    ./gradlew publishRustoreRelease
  4. Please say me your output result and your aab file size.

dev-gvs commented 2 months ago

@cosic The AAB file size is 114,7 MiB, and the output from publish task after ~4 minutes:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:publishRustoreLiveRuStoreRelease'.
> java.net.SocketTimeoutException: timeout

Setting the requestTimeout to higher value didn't help.

cosic commented 2 months ago

@dev-gvs To extend request timeout please add a new one row into the Plugin extention

    configure<ru.cian.rustore.publish.RustorePublishExtension> {
        instances {
            register("release") {
                ...
                buildFormat = ru.cian.rustore.publish.BuildFormat.AAB
                requestTimeout = 1800 // <-- this one, which equals to 30min;
                ....
            }
        }
    }
dev-gvs commented 2 months ago

@cosic doesn't help, still got the java.net.SocketTimeoutException: timeout :thinking:

cosic commented 2 months ago

@dev-gvs How long the plugin do request before SocketTimeoutException?

OK! Let's try 0.5.0-alpha02 version. I've aplied requestTime for readTimeout and writeTimeout too.

If you will get a new error than just run publication task with --info flag.

./gradlew publishRustoreRelease --info

In terminal output you will see raw curl command. You can use it without any timeout restrictions.

dev-gvs commented 2 months ago

@cosic the 0.5.0-alpha02 version actually works! I've used the requestTimeout = 1800, but it finished under 4 minutes, on previous version it would fail around 4 minutes in total.

cosic commented 2 months ago

@dev-gvs Was your aab file published successfully?

dev-gvs commented 2 months ago

@cosic yes!

cosic commented 2 months ago

@dev-gvs Wow! Deep inside I hoped that you will get the same error as me 😄. Well, I going to release this version to get a new feed back. Thx for your help.

dev-gvs commented 2 months ago

@cosic heh, we actually had some problems with RuStore recently (couldn't upload manually from their console), probably some error on their side. But now everything works. So, maybe this is related to your errors :thinking:

cosic commented 2 months ago

@dev-gvs Unfortunately not ((

* What went wrong:
Execution failed for task ':app:publishRustoreRelease'.
> Build file uploading is failed! Reason code: ERROR, message: Jwe token is expired
BUILD FAILED in 23m 10s