Skip to content

Conversation

tsapeta
Copy link
Contributor

@tsapeta tsapeta commented Feb 7, 2020

Why

Followup #6977

After some discussions in the team, we think that it's better to remove Gradle plugin from buildscripts entirely. We will still use buildscript in some libraries that use some custom plugins like the one for Kotlin, but in general most of Android libraries don't include buildscript if they don't use any other plugins. So now we assume the root project must have Gradle plugin in their own buildscript block. Also, we don't see any use-case to open these libs as root projects.

How

  • Removed unnecessary buildscript in build.gradle from all packages.
  • Removed repository { mavenCentral() } from packages that don't need that (they mostly depended on just unimodules-core).
  • Ensured Kotlin plugin version and Kotlin dependency version are in sync.
  • Fixed some packages not using minSdkVersion/targetSdkVersion/compileSdkVersion not allowing to override versions through the root project configuration.

Test Plan

All checks on the CI have passed. I've built the app locally and it works as well.

@tsapeta tsapeta force-pushed the @tsapeta/cleanup-packages-buildscripts branch from d55c101 to 2b36ebf Compare February 7, 2020 10:05
@tsapeta tsapeta marked this pull request as ready for review February 7, 2020 11:47
@@ -17,6 +6,21 @@ apply plugin: 'maven'
group = 'host.exp.exponent'
version = '8.1.0'

buildscript {
Copy link
Member

Choose a reason for hiding this comment

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

Will this create buildscript sections in new modules based on this template?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, because new modules are already being written in Kotlin (there is an implementation below) and I think we still don't want to assume that people using our modules have Kotlin configured in their projects, so until then we should have this buildscript there and download Kotlin's gradle plugin if it's not there yet. Anyway, we will use ext.kotlinVersion so users will be able to set one specific version and reduce number of downloads.

@tsapeta tsapeta merged commit b9a2581 into master Feb 13, 2020
@tsapeta tsapeta deleted the @tsapeta/cleanup-packages-buildscripts branch February 13, 2020 16:42
Jamedjo pushed a commit to Jamedjo/expo that referenced this pull request Feb 4, 2021
# Why

Followup expo#6977 

After some discussions in the team, we think that it's better to remove Gradle plugin from buildscripts entirely. We will still use `buildscript` in some libraries that use some custom plugins like the one for Kotlin, but in general most of Android libraries don't include `buildscript` if they don't use any other plugins. So now we assume the root project must have Gradle plugin in their own `buildscript` block. Also, we don't see any use-case to open these libs as root projects.

# How

- Removed unnecessary `buildscript` in `build.gradle` from all packages.
- Removed `repository { mavenCentral() }` from packages that don't need that (they mostly depended on just `unimodules-core`).
- Ensured Kotlin plugin version and Kotlin dependency version are in sync.
- Fixed some packages not using `minSdkVersion`/`targetSdkVersion`/`compileSdkVersion` not allowing to override versions through the root project configuration.

# Test Plan

All checks on the CI have passed. I've built the app locally and it works as well.
prakashbask pushed a commit to prakashbask/expo that referenced this pull request Mar 16, 2022
# Why

Followup expo#6977 

After some discussions in the team, we think that it's better to remove Gradle plugin from buildscripts entirely. We will still use `buildscript` in some libraries that use some custom plugins like the one for Kotlin, but in general most of Android libraries don't include `buildscript` if they don't use any other plugins. So now we assume the root project must have Gradle plugin in their own `buildscript` block. Also, we don't see any use-case to open these libs as root projects.

# How

- Removed unnecessary `buildscript` in `build.gradle` from all packages.
- Removed `repository { mavenCentral() }` from packages that don't need that (they mostly depended on just `unimodules-core`).
- Ensured Kotlin plugin version and Kotlin dependency version are in sync.
- Fixed some packages not using `minSdkVersion`/`targetSdkVersion`/`compileSdkVersion` not allowing to override versions through the root project configuration.

# Test Plan

All checks on the CI have passed. I've built the app locally and it works as well.
gurs1kh pushed a commit to gurs1kh/expo that referenced this pull request Jan 18, 2024
# Why

Followup expo#6977 

After some discussions in the team, we think that it's better to remove Gradle plugin from buildscripts entirely. We will still use `buildscript` in some libraries that use some custom plugins like the one for Kotlin, but in general most of Android libraries don't include `buildscript` if they don't use any other plugins. So now we assume the root project must have Gradle plugin in their own `buildscript` block. Also, we don't see any use-case to open these libs as root projects.

# How

- Removed unnecessary `buildscript` in `build.gradle` from all packages.
- Removed `repository { mavenCentral() }` from packages that don't need that (they mostly depended on just `unimodules-core`).
- Ensured Kotlin plugin version and Kotlin dependency version are in sync.
- Fixed some packages not using `minSdkVersion`/`targetSdkVersion`/`compileSdkVersion` not allowing to override versions through the root project configuration.

# Test Plan

All checks on the CI have passed. I've built the app locally and it works as well.
Eric-Tyrrell22 pushed a commit to Eric-Tyrrell22/expo that referenced this pull request Aug 14, 2025
# Why

Followup expo#6977 

After some discussions in the team, we think that it's better to remove Gradle plugin from buildscripts entirely. We will still use `buildscript` in some libraries that use some custom plugins like the one for Kotlin, but in general most of Android libraries don't include `buildscript` if they don't use any other plugins. So now we assume the root project must have Gradle plugin in their own `buildscript` block. Also, we don't see any use-case to open these libs as root projects.

# How

- Removed unnecessary `buildscript` in `build.gradle` from all packages.
- Removed `repository { mavenCentral() }` from packages that don't need that (they mostly depended on just `unimodules-core`).
- Ensured Kotlin plugin version and Kotlin dependency version are in sync.
- Fixed some packages not using `minSdkVersion`/`targetSdkVersion`/`compileSdkVersion` not allowing to override versions through the root project configuration.

# Test Plan

All checks on the CI have passed. I've built the app locally and it works as well.
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