Skip to content

Commit bf8dd21

Browse files
committed
merge latest from master
1 parent 231230a commit bf8dd21

86 files changed

Lines changed: 2243 additions & 1348 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
runtime_old/
21
/.metadata/
32
node_modules/
43
dist/

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,38 @@
1+
2.0.0
2+
==
3+
4+
## What's New
5+
6+
- [Android N early developer preview (#378)](https://github.com/NativeScript/android-runtime/issues/378)
7+
- [[Proposal] Static binding generator specification. (#363)](https://github.com/NativeScript/android-runtime/issues/363)
8+
- [Android Runtime Support for older Android versions (#357)](https://github.com/NativeScript/android-runtime/issues/357)
9+
- [Data Marshalling: Support for typed arrays (#65)](https://github.com/NativeScript/android-runtime/issues/65)
10+
- [Support Android Widgets](https://github.com/NativeScript/android-runtime/issues/69)
11+
- [Add support for caching already compiled JS code](https://github.com/NativeScript/android-runtime/issues/257)
12+
- [Additional Intents Crashes app](https://github.com/NativeScript/android-runtime/issues/218)
13+
- [Enable Multidex support](https://github.com/NativeScript/android-runtime/issues/344)
14+
15+
## Bug Fixes
16+
17+
- [Wrong object lifecycle management (#382)](https://github.com/NativeScript/android-runtime/issues/382)
18+
- [CLI can easily fail and blow project up on windows when you have multiple plugins. (#369)](https://github.com/NativeScript/android-runtime/issues/369)
19+
- [Provide method implementations for partially implemented interfaces. (#259)](https://github.com/NativeScript/android-runtime/issues/259)
20+
- [Generate metadata for protected interfaces (#236)](https://github.com/NativeScript/android-runtime/issues/236)
21+
- [Cannot resolve method/constructor signatures when null is passed (#90)](https://github.com/NativeScript/android-runtime/issues/90)
22+
- [App seems to load up with a white screen on run, but works in debug mode #397](https://github.com/NativeScript/android-runtime/issues/397)
23+
24+
## Performance
25+
26+
- [Wrong object lifecycle management (#382)](https://github.com/NativeScript/android-runtime/issues/382)
27+
28+
1.7.1
29+
==
30+
31+
## Bug Fixes
32+
33+
- [Fix application initialization](https://github.com/NativeScript/android-runtime/issues/396)
34+
- [Fix error activity](https://github.com/NativeScript/android-runtime/issues/395)
35+
136
1.7.0
237
==
338

binding-generator/src/main/java/com/tns/bindings/Dump.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ public class Dump
1818
private static final String callJsMethodSignatureMethod = "Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Class;[Ljava/lang/Object;";
1919
private static final String LCOM_TNS = "Lcom/tns/gen/";
2020
private static final String LCOM_TNS_RUNTIME = "Lcom/tns/Runtime;";
21-
static final String preferenceActivityJniSignature = "Lcom/tns/android/preference/PreferenceActivity;";
22-
static final String preferenceActivityClass = "Landroid/preference/PreferenceActivity;";
2321
static final String objectClass = "Ljava/lang/Object;";
2422

2523
static final String runtimeClass = LCOM_TNS_RUNTIME;

build-artifacts/project-template-gradle/build-tools/android-static-binding-generator/ast-parser/helpers/logger.js

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,51 @@
11
var fs = require('fs'),
2-
path = require('path'),
3-
os = require('os'),
2+
path = require('path'),
3+
os = require('os'),
44
fileHelpers = require("./file_helpers")();
55

6-
module.exports = function(setting){
7-
6+
module.exports = function (setting) {
87
var logDirectory = path.dirname(setting.logPath);
9-
if (!fs.existsSync(logDirectory)){
10-
console.error("couldn't find logDirectory so it will be created in place:" + setting.logPath);
11-
fileHelpers.ensureDirectories(setting.logPath);
12-
}
13-
if (os.type().indexOf('Windows') === -1) {
14-
var appLogStat = fs.statSync(logDirectory);
15-
if (canWrite(process.uid === appLogStat.uid, process.gid === appLogStat.gid, appLogStat.mode)){
16-
console.error("ERROR WRITING TO LOG FILE DIRECTORY : " + logDirectory);
17-
process.exit(-1);
8+
9+
// TODO: Logging to file disabled temporarily, console output is default
10+
11+
// if (!fs.existsSync(logDirectory)) {
12+
// console.error("couldn't find logDirectory so it will be created in place:" + setting.logPath);
13+
// fileHelpers.ensureDirectories(setting.logPath);
14+
// }
15+
// if (os.type().indexOf('Windows') === -1) {
16+
// var appLogStat = fs.statSync(logDirectory);
17+
// if (canWrite(process.uid === appLogStat.uid, process.gid === appLogStat.gid, appLogStat.mode)) {
18+
// console.error("ERROR WRITING TO LOG FILE DIRECTORY : " + logDirectory);
19+
// process.exit(-1);
20+
// }
21+
// }
22+
23+
var appLog = createLog(setting.APP_NAME, logDirectory, setting);
24+
25+
if (setting.disable) {
26+
for (var prop in appLog) {
27+
appLog[prop] = function () { };
1828
}
1929
}
2030

21-
var appLog = createLog(setting.APP_NAME, logDirectory, setting);
22-
23-
if(setting.disable) {
24-
for(var prop in appLog) {
25-
appLog[prop] = function() {};
26-
}
27-
}
28-
return appLog;
31+
return appLog;
2932
};
3033

31-
function canWrite(owner, inGroup, mode){
34+
function canWrite(owner, inGroup, mode) {
3235
return owner && (mode & 00200) || // User is owner and owner can write.
3336
inGroup && (mode & 00020) || // User is in group and group can write.
3437
(mode & 00002); // Anyone can write.
3538
}
3639

37-
function createLog(appName, logDirectory, setting){
38-
39-
var appLog = {};
40-
40+
function createLog(appName, logDirectory, setting) {
41+
42+
var appLog = {};
43+
4144
function getRequestId() {
4245
return (process.domain && process.domain.id) || "";
4346
}
4447

45-
function getLogDate(){
48+
function getLogDate() {
4649
var today = new Date();
4750

4851
var fullYear = today.getFullYear();
@@ -65,28 +68,25 @@ function createLog(appName, logDirectory, setting){
6568
var logFile = logDirectory + path.sep + appName + ".log";
6669
var augmentedLine = getLogDate() + "\t" + line + os.EOL
6770
fs.appendFile(logFile, augmentedLine, function (err) {
68-
if(err) {
69-
throw "couldn't write to " + logFile;
71+
if (err) {
72+
throw "couldn't write to " + logFile;
7073
}
7174
});
7275
}
73-
76+
7477
appLog.log = function (input) {
75-
console.log(setMessageWithFormat(input));
76-
appendToLogFile(input);
77-
}
78+
console.log(setMessageWithFormat(input));
79+
}
7880

7981
appLog.info = appLog.log;
80-
82+
8183
appLog.warn = function (input) {
82-
console.warn(setMessageWithFormat(input));
83-
appendToLogFile(input);
84-
}
85-
84+
console.warn(setMessageWithFormat(input));
85+
}
86+
8687
appLog.error = function (input) {
87-
console.error(setMessageWithFormat(input));
88-
appendToLogFile(input);
89-
}
88+
console.error(setMessageWithFormat(input));
89+
}
9090

9191
return appLog;
9292
}

0 commit comments

Comments
 (0)