Граф коммитов

12 Коммитов

Автор SHA1 Сообщение Дата
Dulmandakh 8ccc55fbd3 Prepare Groovy scripts for Kotlin DSL migration (#23355)
Summary:
Using Kotlin DSL in Gradle instead of Groovy will help detect problems early on using static typing, and it has advanced IDE support. This PR prepares Groovy script for Kotlin DSL migration per **Migrating build logic from Groovy to Kotlin** guide. Here is the excerpt:

>As a first migration step, it is recommended to prepare your Groovy build scripts by
> - unifying quotes using double quotes,
> - disambiguating function invocations and property assignments (using respectively parentheses and assignment operator).

See: https://guides.gradle.org/migrating-build-logic-from-groovy-to-kotlin/

[Android] [Changed] - Prepare Gradle scripts for Kotlin DSL migration
Pull Request resolved: https://github.com/facebook/react-native/pull/23355

Differential Revision: D14018504

Pulled By: mdvacca

fbshipit-source-id: 909982c715b640f102cbe723df578c9af7bae08e
2019-02-09 10:18:07 -08:00
Michel dos Santos Kuguio 5be50d4820 - update to gradle 4.10.1 or high (#23103)
Summary:
Add suport to gradle 4.10.1 or high!
The new version of android studio 3.3 recommendete to update gradle project to 4.10.1

> To take advantage of the latest features, improvements, and security fixes, we strongly recommend that you update the Android Gradle plugin to version 3.3.0 and Gradle to version 4.10.1. [Release notes ](https://developer.android.com/studio/releases/gradle-plugin)

>Android plugin 3.2.0 and higher now support building the Android App Bundle—a new upload format that defers APK generation and signing to compatible app stores, such as Google Play. With app bundles, you no longer have to build, sign, and manage multiple APKs, and users get smaller, more optimized downloads. [Learn more](https://developer.android.com/guide/app-bundle/?utm_source=android-studio)

but if the upgrade to the new Android gradle many warnings come up, becouse meny things was obsoleted

> WARNING: API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'.

> WARNING: API 'variant.getPackageApplication()' is obsolete and has been replaced with 'variant.getPackageApplicationProvider()'.

> WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.

> It will be removed at the end of 2019.
> For more information, [see ](https://d.android.com/r/tools/task-configuration-avoidance.)
> To determine what is calling variant.getMergeAssets(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.

Changelog:
----------
[Android] [Deprecated] - fix warinings obsolete to update to gradle 4.10.1 or high
Pull Request resolved: https://github.com/facebook/react-native/pull/23103

Differential Revision: D13817123

Pulled By: cpojer

fbshipit-source-id: 9816e20145a5fded2702cf9317cfb6862f3ebd8b
2019-01-25 03:26:32 -08:00
Daniel Zlotin f3e5cce474 Use new JavaScriptCore from npm (#22231)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/22231

- Use clang instead of the deprecated gcc
- Use libc++ instead of the deprecated gnustl
- Updated gradle and android plugin version
- Fixed missing arch in local-cli template
- `clean` task should now always succeed
- `clean` task deletes build artifacts
- No need to specify buildToolsVersion. It's derived.
- Elvis operator for more readable code
Pull Request resolved: https://github.com/facebook/react-native/pull/22263

Reviewed By: hramos

Differential Revision: D13004499

Pulled By: DanielZlotin

fbshipit-source-id: da54bb744cedb4c6f3bda590f8c25d0ad64086ef
2018-12-27 14:51:03 -08:00
Héctor Ramos 1151c096da Update copyright headers to yearless format
Summary: This change drops the year from the copyright headers and the LICENSE file.

Reviewed By: yungsters

Differential Revision: D9727774

fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
2018-09-11 15:33:07 -07:00
Héctor Ramos da7873563b Migrate Android sources to MIT license header
Reviewed By: fkgozali

Differential Revision: D8065619

fbshipit-source-id: 719c303b40c96950bab8e5dde9a75f449b2956c6
2018-05-31 15:37:30 -07:00
Sasha Nikiforov d8bb990abc Update ReactAndroid build script to support gradle 2.3.0
Summary:
We updated to Gradle 2.3.0 and our app's build failed. Our app doesn't provide "repositoryUrl" which is intended to be an optional gradle property. However, Gradle 2.3.0 blows up on findProperty('repositoryUrl') when "repositoryUrl" isn't provided:

````
* What went wrong:
A problem occurred configuring project ':ContextMenuAndroid'.
> Could not resolve all dependencies for configuration ':ContextMenuAndroid:_debugPublish'.
   > A problem occurred configuring project ':ReactAndroid'.
      > Could not get unknown property 'repositoryUrl' for project ':ReactAndroid' of type org.gradle.api.Project.
````

To fix this, we now use "project.hasProperty('repositoryUrl')" to safely detect the presence of the optional "repositoryUrl" property.

Since I cannot check it with your build environment, I've created a small demo to show that "project.hasProperty" properly detects the presence of the gradle property "repositoryUrl". I edited "getRepositoryUrl" to throw an exception if "repositoryUrl" is set:

````
def getRepositoryUrl() {
    if (project.hasProperty('repositoryUrl')) throw new GradleException(property('repositoryUrl'))

    return project.hasProperty('repositoryUrl') ? property('repositoryUrl') : 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
}
````
Then I ran gradle with "repositoryUrl" set like this (passing the property):
````
./gradlew -PrepositoryUrl=blah assembleDebug
````

As expected, it detected that "repositoryUrl" was set and threw an exception:
````
* What went wrong:
A problem occurred configuring project ':ContextMenuAndroid'.
> Could not resolve all dependencies for configuration ':ContextMenuAndroid:_debugPublish'.
   > A problem occurred configuring project ':ReactAndroid'.
      > blah
````

The same issue has been reported before - #14811, #14810

Minor changes in the Android build script
Closes https://github.com/facebook/react-native/pull/18075

Differential Revision: D7077788

Pulled By: hramos

fbshipit-source-id: ecfbab29d0632e7eecb3c6a247df39bc7616653e
2018-02-23 19:16:02 -08:00
Sophie Alpert 26684cf3ad Update to MIT license
Summary: Manual changes.

Reviewed By: TheSavior, yungsters

Differential Revision: D7012152

fbshipit-source-id: de7459be3db13c687868b45059856f125c4f2eb1
2018-02-16 18:31:53 -08:00
Ovidiu Viorel Iepure 4cff039d78 Circle CI releases now work with Java 8
Reviewed By: bestander

Differential Revision: D4095313

fbshipit-source-id: 1806db054bbca86f6394af077baeccac4e7efbe1
2016-10-28 07:58:52 -07:00
Nick 2a03182b1c CHORE - Remove Trailing Spaces
Summary:Remove Trailing Spaces.

Why:
Sometimes there are conflicts with trailing spaces
Saves space
Those whose tools automatically delete them will have their pr watered down with trailing space removal
Closes https://github.com/facebook/react-native/pull/6787

Differential Revision: D3144704

fb-gh-sync-id: d8a62f115a3f8a8a49d5b07f56c540a02af38cf8
fbshipit-source-id: d8a62f115a3f8a8a49d5b07f56c540a02af38cf8
2016-04-06 09:21:53 -07:00
Martin Konicek 1d561fd604 New release process: Fix installArchives
Reviewed By: mkonicek

Differential Revision:D2917191
Ninja: Only related to open source React Native, does not affect any fb apps

fb-gh-sync-id: c4fc80ebdd520942e75161a4a30ea4d18030bec4
shipit-source-id: c4fc80ebdd520942e75161a4a30ea4d18030bec4
2016-02-09 10:30:32 -08:00
Martin Konicek e0f0bd2832 New release process: simplify installArchives
Summary:
Output the Android artifacts in the new location so we can simply
do `./gradlew :ReactAndroid:installArchives` and `npm publish`.

**Test Plan**

Same as test plan of 702f999b05 without having to manually move the artifacts.

public

Reviewed By: bestander

Differential Revision: D2916664

fb-gh-sync-id: 27dcc711b3055a5a6c554ed1e69cf4a64add849c
shipit-source-id: 27dcc711b3055a5a6c554ed1e69cf4a64add849c
2016-02-09 08:34:59 -08:00
Martin Konicek 42eb5464fd Release React Native for Android
This is an early release and there are several things that are known
not to work if you're porting your iOS app to Android.

See the Known Issues guide on the website.

We will work with the community to reach platform parity with iOS.
2015-09-14 18:13:39 +01:00