Compare commits

...
Author SHA1 Message Date
Mike Grabowski 1142efae44 [0.37.0-rc.2] Bump version numbers 2016-11-02 22:51:44 +01:00
Mike Grabowski 2d3fcf245b Merge branch '0.37-stable' of github.com:facebook/react-native into 0.37-stable 2016-11-02 22:51:00 +01:00
Mike Grabowski d282168548 [0.37.0-rc.1] Bump version numbers 2016-11-01 22:25:49 +01:00
James IdeandMike Grabowski a69581a073 Fix missing methods in Keyboard module
Summary:
They keyboard module is an instance of `NativeEventEmitter` which is an instance of `EventEmitter`. But the exported module only has a small subset of the APIs. This broke existing codebases which are using the methods not exported currently.

The PR just reassigns the variable before exporting so that the actual module is exported instead of the dummy object used for documentation. It also fixes a layout issue in the documentation.
Closes https://github.com/facebook/react-native/pull/10671

Differential Revision: D4110355

fbshipit-source-id: a6757f3ca8c2494970ba221b10a7e6e9a5f2d64d
2016-11-01 22:24:50 +01:00
Ovidiu Viorel IepureandKonstantin Raev 4b1731727a Circle CI releases now work with Java 8
Reviewed By: bestander

Differential Revision: D4095313

fbshipit-source-id: 1806db054bbca86f6394af077baeccac4e7efbe1
2016-10-28 16:02:30 +01:00
Mike Grabowski 4f50fc8392 [0.37.0-rc.0] Bump version numbers 2016-10-26 00:07:23 +02:00
6 changed files with 63 additions and 41 deletions
+50 -21
View File
@@ -11,20 +11,41 @@
*/
'use strict';
const invariant = require('fbjs/lib/invariant');
const NativeEventEmitter = require('NativeEventEmitter');
const KeyboardObserver = require('NativeModules').KeyboardObserver;
const dismissKeyboard = require('dismissKeyboard');
const KeyboardEventEmitter = new NativeEventEmitter(KeyboardObserver);
type KeyboardEventName =
| 'keyboardWillShow'
| 'keyboardDidShow'
| 'keyboardWillHide'
| 'keyboardDidHide'
| 'keyboardWillChangeFrame'
| 'keyboardDidChangeFrame';
type KeyboardEventData = {
endCoordinates: {
width: number,
height: number,
screenX: number,
screenY: number,
},
};
type KeyboardEventListener = (e: KeyboardEventData) => void;
// The following object exists for documentation purposes
// Actual work happens in
// https://github.com/facebook/react-native/blob/master/Libraries/EventEmitter/NativeEventEmitter.js
/**
* `Keyboard` component to control keyboard events.
* `Keyboard` module to control keyboard events.
*
* ### Usage
*
* The Keyboard component allows you to listen for native events and react to them, as
* The Keyboard module allows you to listen for native events and react to them, as
* well as make changes to the keyboard, like dismissing it.
*
*```
@@ -60,16 +81,17 @@ const KeyboardEventEmitter = new NativeEventEmitter(KeyboardObserver);
* }
*```
*/
module.exports = {
let Keyboard = {
/**
* The `addListener` function connects a JavaScript function to an identified native
* keyboard notification event.
*
* This function then returns the reference to the listener.
*
* @param {string} nativeEvent The `nativeEvent` is the string that identifies the event you're listening for. This
* @param {string} eventName The `nativeEvent` is the string that identifies the event you're listening for. This
*can be any of the following:
*
* - `keyboardWillShow`
* - `keyboardDidShow`
* - `keyboardWillHide`
@@ -77,10 +99,20 @@ module.exports = {
* - `keyboardWillChangeFrame`
* - `keyboardDidChangeFrame`
*
* @param {function} jsFunction function to be called when the event fires.
* @param {function} callback function to be called when the event fires.
*/
addListener (nativeEvent: string, jsFunction: Function) {
return KeyboardEventEmitter.addListener(nativeEvent, jsFunction);
addListener(eventName: KeyboardEventName, callback: KeyboardEventListener) {
invariant(false, 'Dummy method used for documentation');
},
/**
* Removes a specific listener.
*
* @param {string} eventName The `nativeEvent` is the string that identifies the event you're listening for.
* @param {function} callback function to be called when the event fires.
*/
removeListener(eventName: KeyboardEventName, callback: Function) {
invariant(false, 'Dummy method used for documentation');
},
/**
@@ -88,24 +120,21 @@ module.exports = {
*
* @param {string} eventType The native event string listeners are watching which will be removed.
*/
removeAllListeners (eventType: string) {
KeyboardEventEmitter.removeAllListeners(eventType);
},
/**
* Removes a specific subscription.
*
* @param {EmitterSubscription} subscription The subscription emitter to be removed.
*/
removeSubscription (subscription: Object) {
KeyboardEventEmitter.removeSubscription(subscription);
removeAllListeners(eventName: KeyboardEventName) {
invariant(false, 'Dummy method used for documentation');
},
/**
* Dismisses the active keyboard and removes focus.
*/
dismiss () {
dismissKeyboard();
dismiss() {
invariant(false, 'Dummy method used for documentation');
}
};
// Throw away the dummy object and reassign it to original module
Keyboard = KeyboardEventEmitter;
Keyboard.dismiss = dismissKeyboard;
module.exports = Keyboard;
+1 -1
View File
@@ -4,7 +4,7 @@ package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
Pod::Spec.new do |s|
s.name = "React"
s.version = package['version']
s.version = "0.37.0-rc.2"
s.summary = package['description']
s.description = <<-DESC
React Native apps are built using the React JS
+1 -1
View File
@@ -1,4 +1,4 @@
VERSION_NAME=1000.0.0-master
VERSION_NAME=0.37.0-rc.2
GROUP=com.facebook.react
POM_NAME=ReactNative
+9 -2
View File
@@ -54,6 +54,14 @@ def configureReactNativePom(def pom) {
}
}
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
afterEvaluate { project ->
task androidJavadoc(type: Javadoc) {
@@ -84,8 +92,7 @@ afterEvaluate { project ->
artifacts {
archives androidSourcesJar
// TODO Make Javadoc generation work with Java 1.8, currently only works with 1.7
// archives androidJavadocJar
archives androidJavadocJar
}
version = VERSION_NAME
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "react-native",
"version": "1000.0.0",
"version": "0.37.0-rc.2",
"description": "A framework for building native apps using React",
"license": "BSD-3-Clause",
"repository": {
@@ -223,4 +223,4 @@
"eslint-plugin-flowtype": "^2.20.0",
"eslint-plugin-react": "^6.4.1"
}
}
}
-14
View File
@@ -50,7 +50,6 @@
require(`shelljs/global`);
const buildBranch = process.env.CIRCLE_BRANCH;
const requiredJavaVersion = `1.7`;
let branchVersion;
if (buildBranch.indexOf(`-stable`) !== -1) {
@@ -88,19 +87,6 @@ if (tagsWithVersion[0].indexOf(`-rc`) === -1) {
}
// -------- Generating Android Artifacts with JavaDoc
// Java -version outputs to stderr 0_o
const javaVersion = exec(`java -version`).stderr;
if (javaVersion.indexOf(requiredJavaVersion) === -1) {
echo(`Java version must be 1.7.x in order to generate Javadoc. Check: java -version`);
exit(1);
}
// Uncomment Javadoc generation
if (sed(`-i`, `// archives androidJavadocJar`, `archives androidJavadocJar`, `ReactAndroid/release.gradle`).code) {
echo(`Couldn't enable Javadoc generation`);
exit(1);
}
if (exec(`./gradlew :ReactAndroid:installArchives`).code) {
echo(`Couldn't generate artifacts`);
exit(1);