mrousavy / react-native-blurhash

🖼️ A library to show colorful blurry placeholders while your content loads.

Home Page:https://blurha.sh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Missing gradle.properties

suniahk opened this issue · comments

Bug

Describe the bug
In the downloaded package files, gradle.properties is missing from the root android folder. This applies to version 1.1.7, not sure about any earlier versions.

To Reproduce
Steps to reproduce the behavior:
yarn add react-native-blurhash
That's it, on compile/clean you'll get something about not being able to find a null package for kotlin, if you don't have kotlin in your root project.

Expected behavior
App to compile without issues and variables referenced in the package to actually exist.

(Optional) Proposed solution
Not entirely sure how packaging for npm/yarn works, but it seems like adding in gradle.properties to that package should fix it? I added it in manually and that seemed to clear the compile/clean error warning up without issue. Can't see the source on npm's side, yarn has unpkg and jsdelivr listed and both sources are showing the file missing.

Yarn config is fairly light, npmRegistryServer is default ("https://registry.yarnpkg.com"). No scopes are used in this project.

Worth noting that adding kotlinVersion to my projects gradle.properties also fixes this, having the gradle.properties in the package just adds the default.

Hey Alex, thank you for reporting! Fixed in 1.1.8, check out the new version on npm

Not sure if this is related, but I still get the following errors with version 1.1.8:

e: /home/llaz/git/project-name/src/frontend/node_modules/react-native-blurhash/android/src/main/java/com/mrousavy/blurhash/Utils.kt: (34, 27): 
Class 'kotlin.collections.FloatIterator' was compiled with an incompatible version of Kotlin. 
The binary version of its metadata is 1.5.1, expected version is 1.1.15.

And was only able to walk around them by explicitly providing kotlinVersion in build.gradle file.