BareConductive / mpr121

Bare Conductive MPR121 Arduino Library
MIT License
83 stars 39 forks source link

Support for platformio and travis-ci #8

Open euphi opened 6 years ago

euphi commented 6 years ago

I changed the directory structure (rename MPR121 subdir to src and moved examples to root directory), so the the repository is now compatible with platformio.

It is not yet registered, but also possible to reference it in platformio projects by its full git path (see https://github.com/euphi/ESP-Touch/tree/Display_WS2812 for example).

I also created a library.json file, so you can easily register it at platformio. Note, that this is untested, because I don't want to register my fork at platformio, but this would be necessary to test it.

I also added a .travis.yml to use the CI service on travis-ci to build all the examples - see https://travis-ci.org/euphi/mpr121/builds/313616941 .

per1234 commented 6 years ago

As it currently stands, this change will cause the library to no longer be considered a valid library by the Arduino IDE. The Arduino IDE requires that a library either contains a header file in the root folder (1.0 library format) or that it contains a library.properties file in the root folder (1.5 library format). You can find the specification for the library.properties file here; https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format

After that change is made this PR will have the added benefit of allowing the library to be installed in the Arduino via the popular "Sketch > Include Library > Add .ZIP Library" installation method, which requires that the library be located in the root of the repository. It also opens the possibility for the library to be added to the Arduino Library Manager index, which also has that requirement.

The change to the 1.5 library format (library source files in the src subfolder) will break backwards compatibility with Arduino IDE 1.0.x. Whether that's considered a serious issue is up to the library author to decide.

stefandz commented 6 years ago

Hi both. Thanks for your contributions. We'll review this in the new year!