cianru / huawei-appgallery-publish-gradle-plugin

Huawei AppGallery Publish Gradle Plugin allows you to publish the android release build file (*.apk or *.aab) to the Huawei AppGallery store
Apache License 2.0
111 stars 20 forks source link

Add support for Gradle 7.0 and AGP 7.0 #28

Closed doodeec closed 3 years ago

doodeec commented 3 years ago

closes #25

cosic commented 3 years ago

@doodeec When I try to execute any gradle task I get error for sample-groovy app

> Configure project :plugin
WARNING: Unsupported Kotlin plugin version.
The `embedded-kotlin` and `kotlin-dsl` plugins rely on features of Kotlin `1.4.31` that might work differently than in the requested version `1.5.21`.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/Users/a.mirko/src/android/gradle/huawei-publish-gradle-plugin/sample-groovy/build.gradle' line: 15

* What went wrong:
A problem occurred evaluating project ':sample-groovy'.
> Failed to apply plugin 'ru.cian.huawei-publish'.
   > Could not create plugin of type 'HuaweiPublishPlugin'.
      > Could not generate a decorated class for type HuaweiPublishPlugin.
         > com/android/build/api/variant/ApplicationVariantProperties

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':sample-groovy'.
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

Did you got the same?

doodeec commented 3 years ago

@doodeec When I try to execute any gradle task I get error for sample-groovy app

> Configure project :plugin
WARNING: Unsupported Kotlin plugin version.
The `embedded-kotlin` and `kotlin-dsl` plugins rely on features of Kotlin `1.4.31` that might work differently than in the requested version `1.5.21`.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/Users/a.mirko/src/android/gradle/huawei-publish-gradle-plugin/sample-groovy/build.gradle' line: 15

* What went wrong:
A problem occurred evaluating project ':sample-groovy'.
> Failed to apply plugin 'ru.cian.huawei-publish'.
   > Could not create plugin of type 'HuaweiPublishPlugin'.
      > Could not generate a decorated class for type HuaweiPublishPlugin.
         > com/android/build/api/variant/ApplicationVariantProperties

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':sample-groovy'.
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

Did you got the same?

Unfortunately yes, the groovy sample seem to have some configuration problem, I wasn't able to figure out what is it yet. I suspect some issue with the classpath, where module cannot find a proper gradle plugin APIs

doodeec commented 3 years ago

I will check that again today

doodeec commented 3 years ago

regarding :sample-groovy - it seems like the groovy sample is trying to pull AGP 4.1 for some reason :thinking: the class from the stacktrace is from the old API https://developer.android.com/reference/tools/gradle-api/4.1/com/android/build/api/variant/ApplicationVariantProperties?hl=en @cosic any idea why that might be happening? I'm out of ideas

doodeec commented 3 years ago

ok nvm, this fixed it for me #31