Skip to content

Commit 3736f83

Browse files
authored
Merge pull request #1267 from NativeScript/master
Prepare 5.2.0 release
2 parents 4497f43 + 91d8e41 commit 3736f83

File tree

179 files changed

+5028
-3681
lines changed

Some content is hidden

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

179 files changed

+5028
-3681
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
env:
22
global:
33
- NODE_VERSION=6.11.1
4-
- NDK_VERSION=r17b
4+
- NDK_VERSION=r18b
55
- DATE=$(date +%Y-%m-%d)
66
- PACKAGE_VERSION=next-$DATE-$TRAVIS_BUILD_NUMBER
77
- EMULATOR_API_LEVEL=21

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
1+
5.2.0
2+
==
3+
4+
## What's New
5+
- [Upgrade v8 to 7.1.302.32(#1237)](https://github.com/NativeScript/android-runtime/issues/1237)
6+
- [Add OnDiscardedError handler(#1245)](https://github.com/NativeScript/android-runtime/issues/1245)
7+
- [Upgrade the android gradle plugin to the latest 3.3.0 version(#1251)](https://github.com/NativeScript/android-runtime/issues/1251)
8+
- [Add android X support(#1226)](https://github.com/NativeScript/android-runtime/issues/1226)
9+
- [Provide a JS helper function on the global object to release the native object wrapped by a JS instance(#1254)](https://github.com/NativeScript/android-runtime/issues/1254)
10+
11+
## Bug Fixes
12+
13+
- [ClassNotFound exception when calling nested static class with correct argument(#1195)](https://github.com/NativeScript/android-runtime/issues/1195)
14+
- [If you refresh or close the chrome dev tools window an error will be log in the console (#1202)](https://github.com/NativeScript/android-runtime/issues/1202)
15+
- [Debug on Android fails when stopped on breakpoint and change in .xml/.css/.html is applied(#1243)](https://github.com/NativeScript/android-runtime/issues/1243)
16+
- [Breakpoint stop to hit when you have two open tabs and close one(#1247)](https://github.com/NativeScript/android-runtime/issues/1247)
17+
- [ClassNotFound exception when calling nested static class with correct argument(#1195)](https://github.com/NativeScript/android-runtime/issues/1195)
18+
- [Upgrade V8 to v7 to fix unstable sort() method(#1176)](https://github.com/NativeScript/android-runtime/issues/1176)
19+
- [CodeCache option is broken since Android Runtime 4.1.0(#1235)](https://github.com/NativeScript/android-runtime/issues/1235)
20+
- [Snapshots with ABI splits do not work since Android Runtime 4.1.0(#1234)](https://github.com/NativeScript/android-runtime/issues/1234)
21+
122
5.1.0
223
==
324

425
## What's New
5-
- [Add a setting to wrap calls to CallJSMethod in try catch(#1223)](https://github.com/NativeScript/android-runtime/issues/12238)
26+
- [Add a setting to wrap calls to CallJSMethod in try catch(#1223)](https://github.com/NativeScript/android-runtime/issues/1223)
627
- [Support for abstract interface with static methods(#1157)](https://github.com/NativeScript/android-runtime/issues/1157)
728
- [Use gradle plugin 3.2.1 instead of 3.2.0(#1209)](https://github.com/NativeScript/android-runtime/pull/1209)
829
- [Add a concrete exception when the runtime cannot be found(#1201)](https://github.com/NativeScript/android-runtime/pull/1201)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright (c) 2015-2018 Progress Software Corporation
189+
Copyright (c) 2015-2019 Progress Software Corporation
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"v8Version": "6.9.427.23"
2+
"v8Version": "7.1.302.32"
33
}

build.gradle

Lines changed: 39 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def useCCache = !project.hasProperty("noCCache")
2020
def isWinOs = System.properties['os.name'].toLowerCase().contains('windows')
2121
def pVersion = "no package version was provided by build.gradle build"
2222
def arVersion = "no commit sha was provided by build.gradle build"
23-
def generateRegularRuntimePackage = !project.hasProperty("skipUnoptimized");
23+
def generateRegularRuntimePackage = !project.hasProperty("skipUnoptimized")
2424

2525
def DIST_PATH = "$rootDir/dist"
2626
def TEST_APP_PATH = "$rootDir/test-app"
@@ -29,19 +29,19 @@ def DIST_FRAMEWORK_PATH = "$DIST_PATH/framework"
2929

3030
task checkEnvironmentVariables {
3131
if ("$System.env.JAVA_HOME" == "" || "$System.env.JAVA_HOME" == "null") {
32-
throw new GradleException("Set JAVA_HOME to point to the correct Jdk location\n");
32+
throw new GradleException("Set JAVA_HOME to point to the correct Jdk location\n")
3333
}
3434

3535
if ("$System.env.ANDROID_HOME" == "" || "$System.env.ANDROID_HOME" == "null") {
36-
throw new GradleException("Set ANDROID_HOME to point to the correct Android SDK location\n");
36+
throw new GradleException("Set ANDROID_HOME to point to the correct Android SDK location\n")
3737
}
3838

3939
if ("$System.env.GIT_COMMIT" == "null" && !project.hasProperty("gitCommitVersion")) {
40-
logger.warn("Warning: The GIT_COMMIT is not set. This NativeScript Android Runtime will not be tagged with the git commit it is build from\n");
40+
logger.warn("Warning: The GIT_COMMIT is not set. This NativeScript Android Runtime will not be tagged with the git commit it is build from\n")
4141
}
4242

4343
if (project.hasProperty("metadataGen") && !file("../android-metadata-generator/dist/tns-android-metadata-generator-0.0.1.tgz").exists()) {
44-
throw new GradleException("android-metadata-generator build output not found and no metadataGen option specified. Build android-metadata-generator first.\n");
44+
throw new GradleException("android-metadata-generator build output not found and no metadataGen option specified. Build android-metadata-generator first.\n")
4545
}
4646
}
4747

@@ -120,9 +120,9 @@ task generateDtsgJar(type: Exec) {
120120
doFirst {
121121
workingDir "$TEST_APP_PATH"
122122
if (isWinOs) {
123-
commandLine "cmd", "/c", "gradlew", ":dts-generator:jar"
123+
commandLine "cmd", "/c", "gradlew", ":dts-generator:jar", "--warning-mode", "all"
124124
} else {
125-
commandLine "./gradlew", ":dts-generator:jar"
125+
commandLine "./gradlew", ":dts-generator:jar", "--warning-mode", "all"
126126
}
127127
}
128128
}
@@ -131,9 +131,9 @@ task generateSbgJar(type: Exec) {
131131
doFirst {
132132
workingDir "$TEST_APP_PATH"
133133
if (isWinOs) {
134-
commandLine "cmd", "/c", "gradlew", ":static-binding-generator:jar"
134+
commandLine "cmd", "/c", "gradlew", ":static-binding-generator:jar", "--warning-mode", "all"
135135
} else {
136-
commandLine "./gradlew", ":static-binding-generator:jar"
136+
commandLine "./gradlew", ":static-binding-generator:jar", "--warning-mode", "all"
137137
}
138138
}
139139
}
@@ -142,21 +142,9 @@ task generateMdgJar(type: Exec) {
142142
doFirst {
143143
workingDir "$TEST_APP_PATH"
144144
if (isWinOs) {
145-
commandLine "cmd", "/c", "gradlew", ":android-metadata-generator:jar"
145+
commandLine "cmd", "/c", "gradlew", ":android-metadata-generator:jar", "--warning-mode", "all"
146146
} else {
147-
commandLine "./gradlew", ":android-metadata-generator:jar"
148-
}
149-
}
150-
}
151-
152-
task generateRuntime {
153-
doFirst {
154-
tasks.generateOptimizedRuntimeAar.execute();
155-
156-
tasks.generateOptimizedWithInspectorRuntimeAar.execute();
157-
158-
if (generateRegularRuntimePackage) {
159-
tasks.generateRuntimeAar.execute();
147+
commandLine "./gradlew", ":android-metadata-generator:jar", "--warning-mode", "all"
160148
}
161149
}
162150
}
@@ -165,9 +153,9 @@ task cleanRuntime (type: Exec) {
165153
doFirst {
166154
workingDir "$TEST_APP_PATH"
167155
if (isWinOs) {
168-
commandLine "cmd", "/c", "gradlew", ":runtime:clean"
156+
commandLine "cmd", "/c", "gradlew", ":runtime:clean", "--warning-mode", "all"
169157
} else {
170-
commandLine "./gradlew", ":runtime:clean"
158+
commandLine "./gradlew", ":runtime:clean", "--warning-mode", "all"
171159
}
172160
}
173161
}
@@ -177,23 +165,24 @@ def getAssembleReleaseBuildArguments = { ->
177165
if (isWinOs) {
178166
arguments += ["cmd", "/c", "gradlew"]
179167
} else {
180-
arguments.push("./gradlew")
168+
arguments.add("./gradlew")
181169
}
182170
arguments += [":runtime:assembleRelease", "-PpackageVersion=${pVersion}", "-PgitCommitVersion=${arVersion}"]
183171
if (onlyX86) {
184-
arguments.push("-PonlyX86")
172+
arguments.add("-PonlyX86")
185173
}
186174
if (useCCache) {
187-
arguments.push("-PuseCCache")
175+
arguments.add("-PuseCCache")
188176
}
189-
return arguments;
177+
arguments += ["--warning-mode", "all"]
178+
return arguments
190179
}
191180

192181
task generateOptimizedRuntimeAar (type: Exec) {
193182
doFirst {
194183
workingDir "$TEST_APP_PATH"
195184
def arguments = getAssembleReleaseBuildArguments()
196-
arguments.push("-Poptimized")
185+
arguments.add("-Poptimized")
197186
commandLine arguments
198187
}
199188
}
@@ -202,7 +191,7 @@ task generateOptimizedWithInspectorRuntimeAar (type: Exec) {
202191
doFirst {
203192
workingDir "$TEST_APP_PATH"
204193
def arguments = getAssembleReleaseBuildArguments()
205-
arguments.push("-PoptimizedWithInspector")
194+
arguments.add("-PoptimizedWithInspector")
206195
commandLine arguments
207196
}
208197
}
@@ -316,7 +305,7 @@ task setPackageVersionInPackageJsonFile {
316305
def inputFile = new File("$DIST_PATH/package.json")
317306
def json = new JsonSlurper().parseText(inputFile.text)
318307
json.version = pVersion
319-
def jb = new JsonBuilder(json);
308+
def jb = new JsonBuilder(json)
320309
inputFile.text = JsonOutput.prettyPrint(jb.toString())
321310
}
322311
}
@@ -344,9 +333,17 @@ createDistDir.dependsOn(generateMdgJar)
344333

345334
getPackageVersion.dependsOn(createDistDir)
346335
getCommitVersion.dependsOn(getPackageVersion)
347-
generateRuntime.dependsOn(getCommitVersion)
336+
generateOptimizedRuntimeAar.dependsOn(getCommitVersion)
337+
338+
generateOptimizedWithInspectorRuntimeAar.dependsOn(generateOptimizedRuntimeAar)
339+
340+
if (generateRegularRuntimePackage) {
341+
generateRuntimeAar.dependsOn(generateOptimizedWithInspectorRuntimeAar)
342+
buildJsParser.dependsOn(generateRuntimeAar)
343+
} else {
344+
buildJsParser.dependsOn(generateOptimizedWithInspectorRuntimeAar)
345+
}
348346

349-
buildJsParser.dependsOn(generateRuntime)
350347
copyFilesToProjectTemeplate.dependsOn(buildJsParser)
351348
copyProjectTemplate.dependsOn(copyFilesToProjectTemeplate)
352349
copyPackageJson.dependsOn(copyProjectTemplate)
@@ -377,9 +374,9 @@ task runSbgTests (type: Exec, dependsOn: 'runAstTests') {
377374
doFirst {
378375
workingDir "$TEST_APP_PATH"
379376
if (isWinOs) {
380-
commandLine "cmd", "/c", "gradlew", ":static-binding-generator:test"
377+
commandLine "cmd", "/c", "gradlew", ":static-binding-generator:test", "--warning-mode", "all"
381378
} else {
382-
commandLine "./gradlew", ":static-binding-generator:test"
379+
commandLine "./gradlew", ":static-binding-generator:test", "--warning-mode", "all"
383380
}
384381
}
385382
}
@@ -389,16 +386,17 @@ def getRunTestsBuildArguments = { taskName ->
389386
if (isWinOs) {
390387
arguments += ["cmd", "/c", "gradlew"]
391388
} else {
392-
arguments.push("./gradlew")
389+
arguments.add("./gradlew")
393390
}
394-
arguments +=["-b", "runtests.gradle", taskName]
391+
arguments += ["-b", "runtests.gradle", taskName]
395392
if (onlyX86) {
396-
arguments.push("-PonlyX86")
393+
arguments.add("-PonlyX86")
397394
}
398395
if (useCCache) {
399-
arguments.push("-PuseCCache")
396+
arguments.add("-PuseCCache")
400397
}
401-
return arguments;
398+
arguments += ["--warning-mode", "all"]
399+
return arguments
402400
}
403401

404402
task runTests (type: Exec) {

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tns-android",
33
"description": "NativeScript Runtime for Android",
4-
"version": "5.1.0",
4+
"version": "5.2.0",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/NativeScript/android-runtime.git"
@@ -10,7 +10,8 @@
1010
"**/*"
1111
],
1212
"gradle": {
13-
"version": "4.10.2",
14-
"android": "3.2.1"
15-
}
13+
"version": "4.10.2",
14+
"android": "3.3.0"
15+
},
16+
"android_ndk_version": "18b"
1617
}

0 commit comments

Comments
 (0)