Coder Social home page Coder Social logo

iconscout / react-native-unicons Goto Github PK

View Code? Open in Web Editor NEW
25.0 25.0 13.0 1.67 MB

Unicons - 1000+ vector icons as easy to use vector React Native Components

License: Other

Java 0.26% JavaScript 99.01% Objective-C 0.35% Ruby 0.24% Starlark 0.15%
icons react-native react-native-icons unicons vector-icons

react-native-unicons's People

Contributors

rankarpan avatar tarunmangukiya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-native-unicons's Issues

Incompatible with RN 0.63.4? (Task :iconscout_react-native-unicons:compileDebugJavaWithJavac FAILED)

Running react-native run-android on my project using react-native 0.63.4 fails with the following:

/Users/unicons-issue/failing-project/node_modules/@iconscout/react-native-unicons/android/src/main/java/com/reactlibrary/UniconsPackage.java:13: error: UniconsPackage is not abstract and does not override abstract method createJSModules() in ReactPackage
public class UniconsPackage implements ReactPackage {
       ^
1 error
3 warnings

FAILURE: Build failed with an exception.

Deprecated Gradle features were used in this build, making them incompatible with Gradle 8.0.

Hi! ๐Ÿ‘‹

Firstly, thanks for your work on this project! ๐Ÿ™‚

Today I used patch-package to patch @iconscout/[email protected] for the project I'm working on.

Deprecated Gradle features were used in this build, making them incompatible with Gradle 8.0.

Here is the diff that solved my problem:

diff --git a/node_modules/@iconscout/react-native-unicons/android/build.gradle b/node_modules/@iconscout/react-native-unicons/android/build.gradle
index 94e9880..21a4e11 100644
--- a/node_modules/@iconscout/react-native-unicons/android/build.gradle
+++ b/node_modules/@iconscout/react-native-unicons/android/build.gradle
@@ -15,7 +15,7 @@ buildscript {
 }
 
 apply plugin: 'com.android.library'
-apply plugin: 'maven'
+apply plugin: 'maven-publish'
 
 // Matches values in recent template from React Native (0.59)
 // https://github.com/facebook/react-native/blob/0.59-stable/template/android/build.gradle#L5-L9
@@ -37,6 +37,13 @@ android {
   lintOptions {
     abortOnError false
   }
+
+    packagingOptions {
+        pickFirst 'lib/x86/libc++_shared.so'
+        pickFirst 'lib/x86_64/libc++_shared.so'
+        pickFirst 'lib/armeabi-v7a/libc++_shared.so'
+        pickFirst 'lib/arm64-v8a/libc++_shared.so'
+    }  
 }
 
 repositories {
@@ -81,12 +88,16 @@ def configureReactNativePom(def pom) {
     }
 }
 
+configurations {
+  customConfig.extendsFrom implementation
+}
+
 afterEvaluate { project ->
 
     task androidJavadoc(type: Javadoc) {
         source = android.sourceSets.main.java.srcDirs
         classpath += files(android.bootClasspath)
-        classpath += files(project.getConfigurations().getByName('compile').asList())
+        //classpath += files(project.getConfigurations().getByName('customConfig').asList())
         include '**/*.java'
     }
 
@@ -96,7 +107,7 @@ afterEvaluate { project ->
     }
 
     task androidSourcesJar(type: Jar) {
-        classifier = 'sources'
+        archiveClassifier = 'sources'
         from android.sourceSets.main.java.srcDirs
         include '**/*.java'
     }
@@ -108,18 +119,18 @@ afterEvaluate { project ->
         }
     }
 
-    artifacts {
-        archives androidSourcesJar
-        archives androidJavadocJar
-    }
+    // artifacts {
+    //     archives androidSourcesJar
+    //     archives androidJavadocJar
+    // }
 
     task installArchives(type: Upload) {
         configuration = configurations.archives
-        repositories.mavenDeployer {
-            // Deploy to react-native-event-bridge/maven, ready to publish to npm
-            repository url: "file://${projectDir}/../android/maven"
+        // repositories.mavenDeployer {
+        //     // Deploy to react-native-event-bridge/maven, ready to publish to npm
+        //     repository url: "file://${projectDir}/../android/maven"
 
-            configureReactNativePom pom
-        }
+        //     configureReactNativePom pom
+        // }
     }
 }

This issue body was partially generated by patch-package.

Provide Icon component

It'd be great if there were an Icon component that used a name prop to render the appropriate icon. I'm using react-native-paper in a current project and the best way to override the icon library they're using is to provide a function that returns a single component that represents/provides access to the entire set of icons.

Incompatible with RN 0.64.1?

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/<a>/Repositories/<x>/packages/app/node_modules/@iconscout/react-native-unicons/android/build.gradle' line: 89

* What went wrong:
A problem occurred configuring project ':iconscout_react-native-unicons'.
> You must specify a URL for a Maven repository.
// build.gradle
task androidJavadoc(type: Javadoc) {
    source = android.sourceSets.main.java.srcDirs
    classpath += files(android.bootClasspath)
    classpath += files(project.getConfigurations().getByName('compile').asList()) // line 89
    include '**/*.java'
}

These are starting to pile up. Please let me know if I can provide anything else that might help. ๐Ÿ”ฅ

incompatible with gradle 8.0

I'm trying to build my reactNative app for the Android platform, but I get this error "Deprecated Gradle features were used in this build, making them incompatible with Gradle 8.0."
image

React Native Web Support

I tried to use this library in my mono-repo react native project including web. I got this error:

rnpeygir/node_modules/@iconscout/react-native-unicons/icons/uil-react.js: Unexpected token (8:4)

image

typescript support

Currently there is no typings for this package. Is it possible to have them?

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.