-
Notifications
You must be signed in to change notification settings - Fork 8.4k
[android] Cleanup Android's buildscripts 🧹 #6987
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
Conversation
d55c101
to
2b36ebf
Compare
@@ -17,6 +6,21 @@ apply plugin: 'maven' | |||
group = 'host.exp.exponent' | |||
version = '8.1.0' | |||
|
|||
buildscript { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
# 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.
# 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.
# 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.
# 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.
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 includebuildscript
if they don't use any other plugins. So now we assume the root project must have Gradle plugin in their ownbuildscript
block. Also, we don't see any use-case to open these libs as root projects.How
buildscript
inbuild.gradle
from all packages.repository { mavenCentral() }
from packages that don't need that (they mostly depended on justunimodules-core
).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.