Update project to use Gradle's plugins{} block

Summary:
This project was still using the legacy Gradle's "apply:" syntax
to apply Gradle Plugins. I'm changing it here to use instead the
`plugins{}` block as it make easier to apply other plugins for publishing later.

Reviewed By: mdvacca

Differential Revision: D46330014

fbshipit-source-id: 5483a717a62d5ab76749026c5203dc96a35d73e7
This commit is contained in:
Nicola Corti
2023-05-31 14:48:05 -07:00
committed by Facebook GitHub Bot
parent f2b4e42ca2
commit 186f4d318d
5 changed files with 20 additions and 16 deletions

View File

@@ -5,7 +5,9 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
apply plugin: 'com.android.library' plugins {
id("com.android.library")
}
android { android {
namespace 'com.facebook.yoga.android' namespace 'com.facebook.yoga.android'

View File

@@ -5,18 +5,9 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
// Top-level build file where you can add configuration options common to all sub-projects/modules. plugins {
id("com.android.library") version "8.0.1" apply false
buildscript { id("com.android.application") version "8.0.1" apply false
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
} }
allprojects { allprojects {

View File

@@ -5,8 +5,9 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
plugins {
apply plugin: 'com.android.library' id("com.android.library")
}
android { android {
namespace 'com.facebook.yoga' namespace 'com.facebook.yoga'

View File

@@ -5,7 +5,9 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
apply plugin: 'com.android.application' plugins {
id("com.android.application")
}
android { android {
namespace 'com.facebook.yoga.sample' namespace 'com.facebook.yoga.sample'

View File

@@ -5,6 +5,14 @@
* LICENSE file in the root directory of this source tree. * LICENSE file in the root directory of this source tree.
*/ */
pluginManagement {
repositories {
gradlePluginPortal()
mavenCentral()
google()
}
}
plugins { id("com.gradle.enterprise").version("3.7.1") } plugins { id("com.gradle.enterprise").version("3.7.1") }
include(":sample", ":yoga", ":yoga-layout") include(":sample", ":yoga", ":yoga-layout")