Skip to content

[in_app_purchase] ./gradlew test build failure if uses a lower version of gradle tool. #85057

@cyanglaz

Description

@cyanglaz

The ./gradlew test in in_app_purchase/example fails because it uses a lower version of gradle and gradle tool than in_app_purchase_android: See https://cirrus-ci.com/task/4784259358523392?logs=main#L6537, failed because BuildConfig.LIBRARY_PACKAGE_NAME is not available in a lower gradle version.

Steps to reproduce:

  1. Get ready with a clean in_app_purchase/example project, git clean -dfx if necessary.
  2. cd to in_app_purchase/example/android/build.gradle, change 'com.android.tools.build:gradle:4.1.0' to `'com.android.tools.build:gradle:3.3.0'
  3. cd to in_app_purchase/example/android/gradle/gradle-wrapper.properties, change distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip to distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
  4. cd to in_app_purchase/example/, run flutter build apk
  5. cd to in_app_purchase/example/android, run ./gradlew test, see the error

A workaround is provided to temporarily fix the tree, however, the ./gradlew test in in_app_purchase should not build the test targets in in_app_purchase_android. If this is the default behavior of the gradle tool, then all the flutter app that depends on in_app_purchase_android and use a lower gradle version will fail when running gradlew test

Metadata

Metadata

Labels

P2Important issues not at the top of the work listc: contributor-productivityTeam-specific productivity, code health, technical debt.dependency: androidAndroid team may need to help usp: in_app_purchasePlugin for in-app purchasep: toolingAffects the flutter_plugin_tools packagepackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyt: gradle"flutter build" and "flutter run" on Android

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions