Skip to content

Commit 0d908c1

Browse files
author
Vasil Hristov
authored
Merge pull request #1467 from NativeScript/master
Release
2 parents 8b66dcd + abc97d0 commit 0d908c1

File tree

221 files changed

+66422
-73897
lines changed

Some content is hidden

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

221 files changed

+66422
-73897
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ bin/
2020
.settings
2121

2222
.classpath
23-
android-runtime.iml
23+
android-runtime.iml

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
env:
22
global:
33
- NODE_VERSION=10
4-
- NDK_VERSION=r19c
4+
- NDK_VERSION=r20
55
- DATE=$(date +%Y-%m-%d)
66
- PACKAGE_VERSION=next-$DATE-$TRAVIS_BUILD_NUMBER
77
- EMULATOR_API_LEVEL=21
88
- ANDROID_ABI=armeabi-v7a
99
- EMULATOR_NAME=runtime-emu
10-
- BUILD_TOOLS=28.0.3
11-
- ANDROID_API=28
10+
- BUILD_TOOLS=29.0.2
11+
- ANDROID_API=29
1212

1313
matrix:
1414
include:

CHANGELOG.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
1+
6.1.0
2+
==
3+
4+
## What's New
5+
- [Runtime Binding Generator depends on deprecated APIs #1441)](https://github.com/NativeScript/android-runtime/issues/1441)
6+
- [The runtime depends on accessing a hidden value field (#1458)](https://github.com/NativeScript/android-runtime/issues/1458)
7+
- [Upgrade v8 to 7.6.303.28 (#1439)](https://github.com/NativeScript/android-runtime/issues/1439)
8+
- [Unify JS stack trace when exception is thrown #1443](https://github.com/NativeScript/android-runtime/issues/1443)
9+
- [Update androidSdk, targetSdk and build tools to 29 (#1452)](https://github.com/NativeScript/android-runtime/issues/1452)
10+
- [Upgrade android gradle plugin to the latest 3.5.0 version (#1456)](https://github.com/NativeScript/android-runtime/issues/1456)
11+
- [Add initial Kotlin support (#1459)](https://github.com/NativeScript/android-runtime/issues/1459)
12+
- [Add support for user defined gradle.properties (#1463)](https://github.com/NativeScript/android-runtime/issues/1463)
13+
14+
15+
## Bug Fixes
16+
17+
- [SIGSEGV in libNativeScript.so on callback from java with console.log when displaying an object. #1366](https://github.com/NativeScript/android-runtime/issues/1366)
18+
119
6.0.2
220
==
321

422
## What's New
523

6-
- [Include x86_64 architecture](https://github.com/NativeScript/android-runtime/issues/1419)
24+
- [Include x86_64 architecture](https://github.com/NativeScript/android-runtime/issues/1419)
725

826
6.0.1
927
==
@@ -16,7 +34,6 @@
1634
- [Upgrade android gradle plugin to the latest 3.4.2 version (#1425)](https://github.com/NativeScript/android-runtime/issues/1425)
1735

1836

19-
2037
6.0.0
2138
==
2239

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"v8Version": "7.5.288.22",
2+
"v8Version": "7.6.303.28",
33
"mksnapshotParams": "--profile_deserialization --turbo_instruction_scheduling --target_os=android --no-native-code-counters"
44
}

build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,14 @@ task copyFilesToProjectTemeplate {
286286
from "$TEST_APP_PATH/build.gradle"
287287
into "$DIST_FRAMEWORK_PATH"
288288
}
289+
copy {
290+
from "$TEST_APP_PATH/paths.gradle"
291+
into "$DIST_FRAMEWORK_PATH"
292+
}
293+
copy {
294+
from "$TEST_APP_PATH/user_properties_reader.gradle"
295+
into "$DIST_FRAMEWORK_PATH"
296+
}
289297
copy {
290298
from "$TEST_APP_PATH/gradle"
291299
into "$DIST_FRAMEWORK_PATH/gradle"

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip

package.json

Lines changed: 4 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": "6.0.2",
4+
"version": "6.1.0",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/NativeScript/android-runtime.git"
@@ -10,8 +10,8 @@
1010
"**/*"
1111
],
1212
"gradle": {
13-
"version": "5.1.1",
14-
"android": "3.4.2"
13+
"version": "5.4.1",
14+
"android": "3.5.0"
1515
},
16-
"android_ndk_version": "19c"
16+
"android_ndk_version": "20"
1717
}

test-app/app/build.gradle

Lines changed: 47 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,25 @@
1818
* -PandroidXMaterial=[androidx_material_version]
1919
*/
2020

21+
22+
import groovy.io.FileType
2123
import groovy.json.JsonSlurper
24+
25+
import javax.inject.Inject
2226
import java.nio.file.Files
2327
import java.nio.file.Paths
2428
import java.nio.file.StandardCopyOption
25-
import groovy.io.FileType
2629
import java.security.MessageDigest
27-
import javax.inject.Inject
30+
2831
apply plugin: "com.android.application"
2932

33+
def enableKotlin = (project.hasProperty("useKotlin") && project.useKotlin == "true")
34+
35+
if (enableKotlin) {
36+
apply plugin: 'kotlin-android'
37+
apply plugin: 'kotlin-android-extensions'
38+
}
39+
3040
def onlyX86 = project.hasProperty("onlyX86")
3141
if (onlyX86) {
3242
println "OnlyX86 build triggered."
@@ -61,10 +71,11 @@ def METADATA_OUT_PATH = "$projectDir/src/main/assets/metadata"
6171
def pluginsJarLibraries = new LinkedList<String>()
6272
def allJarLibraries = new LinkedList<String>()
6373

64-
def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk : 28 }
65-
def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? targetSdk : 28 }
74+
def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "1.3.41" }
75+
def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk : 29 }
76+
def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? targetSdk : 29 }
6677
def computeBuildToolsVersion = { ->
67-
project.hasProperty("buildToolsVersion") ? buildToolsVersion : "28.0.3"
78+
project.hasProperty("buildToolsVersion") ? buildToolsVersion : "29.0.2"
6879
}
6980

7081
project.ext.selectedBuildType = project.hasProperty("release") ? "release" : "debug"
@@ -217,6 +228,13 @@ def setAppIdentifier = { ->
217228
}
218229

219230
android {
231+
232+
if (enableKotlin) {
233+
kotlinOptions {
234+
jvmTarget = '1.8'
235+
}
236+
}
237+
220238
compileSdkVersion computeCompileSdkVersion()
221239
buildToolsVersion computeBuildToolsVersion()
222240

@@ -302,6 +320,7 @@ repositories {
302320
dirs pluginDependencies
303321
}
304322
}
323+
mavenCentral()
305324
}
306325

307326
dependencies {
@@ -320,9 +339,9 @@ dependencies {
320339
androidXMaterialVersion = androidXMaterial
321340
}
322341

323-
println "\t + using andorid X library androidx.legacy:legacy-support-v4:$androidXLegacyVersion"
342+
println "\t + using android X library androidx.legacy:legacy-support-v4:$androidXLegacyVersion"
324343

325-
implementation "androidx.multidex:multidex:2.0.0"
344+
implementation "androidx.multidex:multidex:2.0.1"
326345
implementation "androidx.legacy:legacy-support-v4:$androidXLegacyVersion"
327346
implementation "androidx.appcompat:appcompat:$androidXAppCompatVersion"
328347
implementation "com.google.android.material:material:$androidXMaterialVersion"
@@ -361,6 +380,11 @@ dependencies {
361380
implementation project(':runtime')
362381
}
363382

383+
def kotlinVersion = computeKotlinVersion()
384+
if (enableKotlin) {
385+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion"
386+
}
387+
364388
}
365389

366390
////////////////////////////////////////////////////////////////////////////////////
@@ -545,7 +569,7 @@ afterEvaluate { project ->
545569
// if there's a project dependency search for its result jar file in the build/intermediates/runtime_library_classes folder
546570
// this is the output folder in gradle 5.1.1, but it can be changed in the future versions of gradle
547571
def jarDir = new File("${it.getBuildDir()}/intermediates/runtime_library_classes/${buildType.toLowerCase()}")
548-
if(jarDir.exists()) {
572+
if (jarDir.exists()) {
549573
jarDir.eachFileRecurse(FileType.FILES) { file ->
550574
if (file.path.endsWith(".jar")) {
551575
processJar(file, jars)
@@ -574,7 +598,7 @@ def processJar(File jar, jars) {
574598
// directory is a randomly generated string)
575599
cleanupAllJars.inputs.files jar
576600

577-
task "${taskName}" (type: WorkerTask) {
601+
task "${taskName}"(type: WorkerTask) {
578602
dependsOn cleanupAllJars
579603
extractAllJars.dependsOn it
580604

@@ -683,6 +707,11 @@ task buildMetadata(type: JavaExec) {
683707
def classesDir = "$buildDir/intermediates/javac"
684708
inputs.dir(classesDir)
685709

710+
def kotlinClassesDir = "$buildDir/tmp/kotlin-classes"
711+
if (file(kotlinClassesDir).exists()) {
712+
inputs.dir(kotlinClassesDir)
713+
}
714+
686715
outputs.files("$METADATA_OUT_PATH/treeNodeStream.dat", "$METADATA_OUT_PATH/treeStringsStream.dat", "$METADATA_OUT_PATH/treeValueStream.dat")
687716

688717
doFirst {
@@ -700,6 +729,15 @@ task buildMetadata(type: JavaExec) {
700729
}
701730
}
702731

732+
if (file(kotlinClassesDir).exists()) {
733+
def kotlinClassesSubDirs = new File(kotlinClassesDir).listFiles()
734+
for (File subDir : kotlinClassesSubDirs) {
735+
if (subDir.getName() == selectedBuildType) {
736+
generatedClasses.add(subDir.getAbsolutePath())
737+
}
738+
}
739+
}
740+
703741
new File("$BUILD_TOOLS_PATH/$MDG_OUTPUT_DIR").withWriter { out ->
704742
out.println "$METADATA_OUT_PATH"
705743
}

test-app/app/src/main/assets/app/mainpage.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,9 @@ require("./tests/dex-interface-implementation");
5353
require("./tests/testInterfaceImplementation");
5454
require("./tests/testRuntimeImplementedAPIs");
5555
require("./tests/testsInstanceOfOperator");
56-
require("./tests/testReleaseNativeCounterpart");
56+
require("./tests/testReleaseNativeCounterpart");
57+
require("./tests/kotlin/companions/testCompanionObjectsSupport");
58+
require("./tests/kotlin/properties/testPropertiesSupport");
59+
require("./tests/kotlin/delegation/testDelegationSupport");
60+
require("./tests/kotlin/objects/testObjectsSupport");
61+
require("./tests/kotlin/functions/testTopLevelFunctionsSupport");
Binary file not shown.

0 commit comments

Comments
 (0)