jpnurmi / flutter_libserialport

Serial Port for Flutter
https://pub.dev/packages/flutter_libserialport
MIT License
139 stars 80 forks source link

HAVE_STRUCT_TERMIOX definition prevents android build on newer Kotlin and Gradle versions. #84

Closed ajeeshklr closed 2 months ago

ajeeshklr commented 10 months ago

HAVE_STRUCT_TERMIOX definition for android is failing build generation for android for the following Kotlin and Gradle versions.

This is similar to the issue #50

Kotlin version from build.gradle

buildscript { ext.kotlin_version = '1.8.0' repositories { google() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:7.4.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } }

gradle-wrapper.properties distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip

The following code snippet resolves the compilation issue.

android/libserialport/config.h undef HAVE_STRUCT_TERMIOX

This merge request also contains changes for supporting libserialport 0.3 and the latest flutter_libserialport in pub. Yaml file is merged with relevant changes.

Functionality of the library is verified in real hardware with these changes.

rekire commented 7 months ago

You might want to rollback the line ending changes, which are a bit noise in your PR

guyluz11 commented 4 months ago

This pr solves the build Thanks :D

Unfortunately, now we are stuck on the permission error as a blocker, Permission denied, errno = 13 you didn't get it?.