Giter Club home page Giter Club logo

Comments (4)

jonasfj avatar jonasfj commented on July 28, 2024

@gourgouris reproduction steps please?

We have integration tests for android:

android:
name: webcrypto on Android emulator
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
architecture: x64
- name: Configure Flutter
run: |
flutter config --no-analytics
- run: flutter pub get
- name: Run flutter test integration_test/webcrypto_test.dart -d android
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 28
working-directory: ./example
script: flutter test integration_test/webcrypto_test.dart -d android

Could we reproduce this by trying to build the example/ app in release mode?

Do we need to upgrade the example/ app to reproduce this?

I could probably use some help here.


What are the changes required here? (happy to take PRs, ping me on any PRs)

Will those changes have implications on people using an older gradle version? (if so this needs to be documented in the CHANGELOG before we ship any changes).

from webcrypto.dart.

gourgouris avatar gourgouris commented on July 28, 2024

hi @jonasfj, can't really test it right now, but my thinking is the following:

replication steps

  1. in example/
  2. in android/build.gradle change classpath 'com.android.tools.build:gradle:7.1.2' to 'com.android.tools.build:gradle:8.2.2'
  3. in android/gradle/wrapper/gradle-wrapper.properties change distributionUrl=https://services.gradle.org/distributions/gradle-7.4-all.zip to distributionUrl=https://services.gradle.org/distributions/gradle-8.2-all.zip

compiling now should give you the same error.

To fix it, the first I'd do would be to add a namespace line in the android/build.gradle of the plugin AND the example (eg like here: https://github.com/flutter/packages/blob/0af905d779d52fc81ffc239c211e8c5956154f34/packages/path_provider/path_provider_android/android/build.gradle#L27)
And that should theoritically get rid of the error

from webcrypto.dart.

jonasfj avatar jonasfj commented on July 28, 2024

Okay, still unclear if it'll affect people using older versions of gradle.

I see new flutter templates have android/build.gradle with:

    if (project.android.hasProperty("namespace")) {
        namespace 'com.example.mypkg'
    }

We should probably investigate this further.

from webcrypto.dart.

gourgouris avatar gourgouris commented on July 28, 2024

Yes, this is because older versions of gradle (<4.2) do not support the namespace property and thus would fail to build (unknown property 'namespace').

From the offically maintained flutter packages, I can understand this is the way to go now.
Relevant PRs:
flutter/packages@6284c2d
(bulk adds namespace to all packages)

flutter/packages@a86beaf
(bulk conditionalizes namespace, 3 days apart)

My point is it looks safe, since all flutter packages do it anyway, but that's as far I can help I think.

from webcrypto.dart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.