Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AGP compatibility #16

Closed
CedrickFlocon opened this issue Nov 30, 2020 · 9 comments · Fixed by #18
Closed

AGP compatibility #16

CedrickFlocon opened this issue Nov 30, 2020 · 9 comments · Fixed by #18
Assignees
Labels
bug Something isn't working

Comments

@CedrickFlocon
Copy link
Contributor

Huawei-pubilsh-gradle-plugin version 1.2.1 is not compatible with com.android.tools.build:gradle:4.1.1

Log :

* What went wrong:
Execution failed for task ':app:publishHuaweiAppGalleryProdHmsRelease'.
> com.android.build.gradle.internal.scope.InternalArtifactType$BUNDLE cannot be cast to com.android.build.api.artifact.ArtifactType

Gradle Play publisher already has the issue and fixed it : Triple-T/gradle-play-publisher#824
I guess this is the related commit :
Triple-T/gradle-play-publisher@4d52010
Triple-T/gradle-play-publisher@354812b

@ipBill
Copy link

ipBill commented Dec 3, 2020

Same you It's not working. type aab

@cosic cosic self-assigned this Dec 6, 2020
@cosic cosic added the bug Something isn't working label Dec 6, 2020
@cosic
Copy link
Contributor

cosic commented Dec 6, 2020

@CedrickFlocon @ipBill
Hi! Yeap, it doesn't work yet. Thx for created issue. To continue using the plugin you can temporary apply buildFile plugin parameter. For example

buildFile = "$projectDir/build/outputs/bundle/release/sample1-release.aab"

@juliocbcotta
Copy link
Contributor

I also have this issue, but my apk name is generated dynamically so I can't just put it in the gradle file.

@cosic
Copy link
Contributor

cosic commented Dec 22, 2020

@BugsBunnyBR Hi!
To dynamically detect the build file on unix system you can use cli parameter --buildFile before fixing this issue. Something like that

./gradlew publishHuaweiAppGalleryRelease \                                                                                                                               ✔     
    --buildFile=$(ls ./app/build/outputs/apk/release/*.apk| head -1) \
    --buildFormat=apk

I understand that this is not very convenient, but this will temporarily solve your problem
before fixing the bug to dynamically detect the build file you can use something like that

@juliocbcotta
Copy link
Contributor

@cosic , could you take a look at the PR?

@juliocbcotta
Copy link
Contributor

Can we have a release or at least a SNAPSHOT version to test now that the PR was merged?

@cosic
Copy link
Contributor

cosic commented Jan 4, 2021

@BugsBunnyBR Yeap, you can check your changes at 1.2.2-SNAPSHOT version

@juliocbcotta
Copy link
Contributor

I tested the snapshot in AGP 4.1.1 and it worked.

it would be great to have an option dry-run that does everything that needs to do but abort the upload right before it starts sending data... so we could test the AGP integration more easily.

@cosic
Copy link
Contributor

cosic commented Jan 14, 2021

@BugsBunnyBR My dream is to write tests to test this. But you can execute plugin for sample1 project. It'll find build file and return error for Rest API request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants