Skip to content

Conversation

@ahmed-gelemli
Copy link

Problem

Android builds on modern toolchains (Gradle 7/8, AGP 8) fail with:

  • Plugin with id 'maven' not found
  • compileSdkVersion is not specified
  • namespace not specified for project ...

The package also still referenced jcenter() and documented the obsolete installArchives flow. Additionally, current Expo / RN templates (React 19) could not install the package because of a too‑narrow react peerDependency (<19.0.0).


What this PR does

Android / Gradle

  • Removes the deprecated maven plugin and all legacy publishing tasks.
  • Adds an Android namespace but keeps it as com.reactlibrary to remain fully backward‑compatible with the existing Java package and RN autolinking.
  • Provides sane default SDK versions (still overrideable from the host app via rootProject.ext):
    • compileSdkVersion: 34
    • targetSdkVersion: 34
    • minSdkVersion: 21
  • Drops jcenter().
  • Modernizes lint {} and Java 8 compileOptions.

Peer deps

  • Widens react to allow React 19: >=16.8.0 <20.0.0
  • Normalizes react-native range to >=0.59.0 <1.0.0
  • Widens react-native-svg to >=9.5.3 <17.0.0 so modern Expo/RN stacks don’t fail to install.

Docs

  • Updates android/README.md to remove the obsolete installArchives / maven instructions and mention maven-publish as the modern alternative if Gradle publishing is still desired.

Backwards compatibility

  • No Java package renames; we explicitly kept com.reactlibrary.
  • Apps that already define their own SDK versions via rootProject.ext continue to work.
  • The peer dep widening only removes installation friction; there are no runtime changes.

How to test

  1. Install this branch in a modern Expo / RN app (React 18/19 both work):
    # package.json
    "@iconscout/react-native-unicons": “github:ahmed-gelemli/react-native-unicons#a3f0792"

@ahmed-gelemli
Copy link
Author

@tarunmangukiya @rankarpan @imzedi gentle ping — this PR is comprehensive & non‑breaking, fixes Gradle 7/8 + AGP 8 build failures, and widens peer deps for React 19. Details are in the description. Could we get a quick review/merge + release? 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant