mono0926 / barcode_scan2

[reborned barcode_scan] A flutter plugin for reading 2D barcodes and QR codes.
https://pub.dev/packages/barcode_scan2
MIT License
87 stars 79 forks source link

[Bug] Gradle 8 support #73

Closed casper-rinnai closed 4 months ago

casper-rinnai commented 1 year ago

https://github.com/flutter/flutter/issues/125181

Flutter app android module can't be upgraded to gradle 8, until all dependencies which use native code are also upgraded or at least have namespace in app/build.gradle.

android { namespace = "com.example.myapp" ... }

ArocaAlejandro commented 1 year ago

Downgrade your build to gradle 7.

Only need to add the namespace for the module in the package for working with the newest requisites from gradle 8.x. Can do it manually until they fix it entering in the package and adding the namespace="de.mintware.barcode_scan"

ArocaAlejandro commented 12 months ago

I've do a temporaly fix

In the android/build.gradle change the android to

android {
    namespace "de.mintware.barcode_scan"
    compileSdkVersion 31

    compileOptions {
    sourceCompatibility JavaVersion.VERSION_17
    targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
    jvmTarget = '17'
}

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
        main.proto.srcDirs += '../protos'
    }
    defaultConfig {
        minSdkVersion 18
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles 'proguard-rules.pro'
    }
    lintOptions {
        disable 'InvalidPackage'
    }
}

I will try later out of my work and run the tests. If I can build it with those parameters and got it fine, i do a pull request

Letalus commented 11 months ago

@ArocaAlejandro do you have any updates on here?

ArocaAlejandro commented 9 months ago

Sorry, i don't see the mail with the response, i've answered on this

78

robinbonnes commented 4 months ago

I've created a PR, you can use my fork untill this is merged by changing your pubspec.yaml to:

dependencies:
  barcode_scan2:
    git:
      url: https://github.com/robinbonnes/barcode_scan2
mono0926 commented 4 months ago

Merged #87 and released v4.3.2 🐶