Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove com.diffplug.spotless version from build.gradle #1118

Closed
wants to merge 2 commits into from

Conversation

cruzach
Copy link
Contributor

@cruzach cruzach commented Sep 9, 2021

Description

Fixes android builds failing with

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/charliecruzan/source/expo/node_modules/react-native-screens/android/build.gradle' line: 14

* What went wrong:
Error resolving plugin [id: 'com.diffplug.spotless', version: '5.14.1']
> Plugin request for plugin already on the classpath must not include a version

If projects installing react-native-screens also use com.diffplug.spotless

Changes

removed the version specification from build.gradle, and placed it in settings.gradle inside of pluginManagement block, as suggested here

Test code and steps to reproduce

init a RN project, add

plugins {
  id "com.diffplug.spotless" version "5.14.1"
}

to build.gradle

yarn add react-native-screens, and try to build.

Checklist

@cruzach cruzach marked this pull request as ready for review September 9, 2021 22:36
Copy link
Member

@kacperkapusciak kacperkapusciak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change would require all of the developers who use react-native-screens to install spotless in their project - hence the CI fail here and in the expo repo. I'm also trying to fix this issue.

Cheers

@cruzach cruzach closed this Sep 10, 2021
@cruzach cruzach deleted the patch-1 branch September 10, 2021 13:33
kacperkapusciak added a commit that referenced this pull request Sep 10, 2021
Fixes issue mentioned in #1118 with clashing Spotless configuration when developer's app also uses Spotless.

This PR makes spotless only load within the react-native-screens project.
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.

2 participants