Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
048fba6
bumped version
vtrifonov Jul 26, 2018
051533a
reordering the apply gradle configurations
vtrifonov Jul 26, 2018
b5eaac5
Merge pull request #1124 from NativeScript/trifonov/reorder-gradle-apply
vtrifonov Jul 27, 2018
5de5a8a
Merge branch 'release'
vtrifonov Jul 27, 2018
a59e559
Generate interface names in parallel
vtrifonov Jul 30, 2018
dc15a6b
Merge pull request #1131 from NativeScript/trifonov/sbg-parallel-inte…
vtrifonov Jul 31, 2018
8aa65dc
Merge branch 'release'
vtrifonov Jul 31, 2018
425025b
Merge branch 'release'
vtrifonov Aug 2, 2018
c023376
Merge branch 'release'
vtrifonov Aug 3, 2018
0c83f7c
Upgrade android gradle
vtrifonov Aug 9, 2018
c5a1c96
Fail SBG when there's an error in the JSParser
vtrifonov Aug 13, 2018
cc7c231
Merge pull request #1154 from NativeScript/trifonov/android-gradle-up…
vtrifonov Aug 13, 2018
9304b85
Merge branch 'master' into trifonov/js-parser-error-fail
vtrifonov Aug 13, 2018
98c0b2c
Improve error logging
vtrifonov Aug 13, 2018
9652247
Merge pull request #1156 from NativeScript/trifonov/js-parser-error-fail
vtrifonov Aug 13, 2018
af4395e
feat: make ls socket connection wait for ls operation indefinately
KristianDD Aug 23, 2018
8411f6a
Merge pull request #1162 from NativeScript/kddimitrov/long-living-soc…
vtrifonov Aug 28, 2018
e82c7ff
Improve js-parser to get the decorator from the last assignment
vtrifonov Aug 28, 2018
3c6e593
fixed getting right expression when there is no expression
vtrifonov Aug 29, 2018
c11d63e
Added a test for double assignment
vtrifonov Aug 29, 2018
f416921
Merge pull request #1163 from NativeScript/trifonov/fix-js-parser
vtrifonov Aug 29, 2018
bbc57c2
Fixing NoClassDefFoundError when using older APIs
vtrifonov Aug 31, 2018
e204db3
Get just public methods if there's an error getting all methods
vtrifonov Sep 3, 2018
1fa1b6e
Improve methods getting to try catch getMethods as well
vtrifonov Sep 3, 2018
dff0fd3
Merge pull request #1164 from NativeScript/trifonov/fix-NoClassDefFou…
vtrifonov Sep 3, 2018
d8be851
docs: forums to Stack Overflow
Sep 11, 2018
d261a5a
Merge pull request #1171 from NativeScript/radeva/forums-to-so
vtrifonov Sep 12, 2018
384f3c3
chore: add bug report and feature request templates (#1165)
etabakov Sep 21, 2018
e75d84f
Upgrade v8 to 6.8.275.26
darind Aug 16, 2018
51b7d9c
Upgrade v8 to 6.9.427.19
darind Sep 5, 2018
a06255f
Upgrade v8 to 6.9.427.20
darind Sep 10, 2018
f3840d4
Upgrade v8 to 6.9.427.22
darind Sep 12, 2018
dc35d80
Upgrade v8 to 6.9.427.23
darind Sep 18, 2018
4e1b80e
upgrade gradle to the latest versions
vtrifonov Sep 27, 2018
bbc0ac9
remove unneeded print
vtrifonov Sep 27, 2018
29294e6
Merge pull request #1174 from NativeScript/darind/v8-6.9.427.23
darind Sep 27, 2018
e9ceb97
Merge branch 'master' into trifonov/gradle-update
vtrifonov Sep 27, 2018
26efcb8
Add support version print
vtrifonov Sep 27, 2018
d3d8fe2
use old gradles in metadata generator
vtrifonov Sep 27, 2018
4bf5fbc
removed unneeded content
vtrifonov Sep 27, 2018
469279b
changed classesDir - in gradle 4.10.2 the java classes are output in …
vtrifonov Sep 28, 2018
4d88028
add a log for existing folders for troubleshooting
vtrifonov Sep 28, 2018
cff8ff8
move folder exists assert
vtrifonov Sep 28, 2018
7dad498
Merge pull request #1177 from NativeScript/trifonov/gradle-update
vtrifonov Sep 28, 2018
1261052
Delete gradle-wrapper.jar
vtrifonov Sep 28, 2018
8671e12
Delete gradle-wrapper.properties
vtrifonov Sep 28, 2018
9b02108
Merge branch 'master' into trifonov/gradle-update
vtrifonov Sep 28, 2018
31fd3bd
chore: missing bracket
etabakov Oct 5, 2018
0fc33c1
Merge branch 'master' into trifonov/gradle-update
vtrifonov Oct 8, 2018
afc5aea
Merge pull request #1180 from NativeScript/trifonov/gradle-update
vtrifonov Oct 8, 2018
94d42ac
added support for before-plugins.gradle file applied before plugin
vtrifonov Oct 9, 2018
4f08591
Merge pull request #1185 from NativeScript/trifonov/before-plugins
vtrifonov Oct 9, 2018
9c44931
Updated changelog
vtrifonov Oct 11, 2018
ae1fdd7
Upgrade gradle to 4.10.2 in main gradle-wrapper.properties
darind Oct 11, 2018
2bb64de
Merge pull request #1187 from NativeScript/darind/gradle-update
vtrifonov Oct 12, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: 'We really appreciate your effort to provide feedback. Before opening a new
issue, please make sure that this case is not already reported in GitHub as an
issue or in StackOverflow as a question.'

---

**Environment**
Provide version numbers for the following components (information can be retrieved by running `tns info` in your project folder or by inspecting the `package.json` of the project):
- CLI:
- Cross-platform modules:
- Android Runtime:
- iOS Runtime (if applicable):
- Plugin(s):

**Describe the bug**
<!-- A clear and concise description of what the bug is. Please, explain whether it's a build time error or a runtime error. More detailed logs can be easily obtained by following the instructions in this guide: https://docs.nativescript.org/get-support#how-to-obtain-diagnostic-reports. -->

**To Reproduce**
<!-- Add commands used or steps taken to reproduce the behaviour. -->

**Expected behavior**

**Sample project**
<!-- If possible, provide a link from the [Playground](https://play.nativescript.org) with reproduction of the problem. If not, consider attaching a sample project or link to a repository with such project. -->

**Additional context**
<!-- Add any other context about the problem here. -->
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Explain what is stopping you from finishing the job. -->

**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
5.0.0
==

## What's New
- [Upgrade v8 to 6.9.427.23(#1168)](https://github.com/NativeScript/android-runtime/issues/1168)
- [Added support for before-plugins.gradle file applied before plugin(#1183)](https://github.com/NativeScript/android-runtime/pull/1185)
- [Make JSParser in SBG fail the build when failing(#1152)](https://github.com/NativeScript/android-runtime/issues/1152)
- [Generate interface names list in SBG in parallel(#1132)](https://github.com/NativeScript/android-runtime/issues/1132)
- [Upgrade android gradle plugin to 3.2.0(#1147)](https://github.com/NativeScript/android-runtime/issues/1147)

## Bug Fixes

- [Static Binding Generator fails if class has static properties that are used within the class(#1160)](https://github.com/NativeScript/android-runtime/issues/1160)
- [Fixing NoClassDefFoundError when using older API(#1164)](https://github.com/NativeScript/android-runtime/pull/1164)

4.2.0
==

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,4 @@ We love PRs! Check out the [contributing guidelines](CONTRIBUTING.md). If you wa
* [Implementing additional Chrome DevTools protocol Domains](docs/extending-inspector.md)

## Get Help
Please, use [github issues](https://github.com/NativeScript/android-runtime/issues) strictly for [reporting bugs](CONTRIBUTING.md#reporting-bugs) or [requesting features](CONTRIBUTING.md#requesting-new-features). For general questions and support, check out the [NativeScript community forum](https://discourse.nativescript.org/) or ask our experts in [NativeScript community Slack channel](http://developer.telerik.com/wp-login.php?action=slack-invitation).
Please, use [github issues](https://github.com/NativeScript/android-runtime/issues) strictly for [reporting bugs](CONTRIBUTING.md#reporting-bugs) or [requesting features](CONTRIBUTING.md#requesting-new-features). For general questions and support, check out [Stack Overflow](https://stackoverflow.com/questions/tagged/nativescript) or ask our experts in [NativeScript community Slack channel](http://developer.telerik.com/wp-login.php?action=slack-invitation).
2 changes: 1 addition & 1 deletion build-artifacts/project-template-gradle/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"v8Version": "6.7.288.46"
"v8Version": "6.9.427.23"
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "tns-android",
"description": "NativeScript Runtime for Android",
"version": "4.2.0",
"version": "5.0.0",
"repository": {
"type": "git",
"url": "https://github.com/NativeScript/android-runtime.git"
Expand All @@ -11,6 +11,6 @@
],
"gradle": {
"version": "4.4",
"android": "3.1.3"
"android": "3.1.4"
}
}
25 changes: 20 additions & 5 deletions test-app/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def nativescriptDependencies = new JsonSlurper().parseText(dependenciesJson.text
def computeCompileSdkVersion = { -> project.hasProperty("compileSdk") ? compileSdk : 26 }
def computeTargetSdkVersion = { -> project.hasProperty("targetSdk") ? targetSdk : 26 }
def computeBuildToolsVersion = { ->
project.hasProperty("buildToolsVersion") ? buildToolsVersion : "27.0.3"
project.hasProperty("buildToolsVersion") ? buildToolsVersion : "28.0.2"
}

project.ext.selectedBuildType = project.hasProperty("release") ? "release" : "debug"
Expand Down Expand Up @@ -111,7 +111,17 @@ def getAppResourcesPath = { ->
project.ext.appResourcesPath = absolutePathToAppResources

return absolutePathToAppResources
};
}

def applyBeforePluginGradleConfiguration = { ->
def appResourcesPath = getAppResourcesPath()
def pathToBeforePluginGradle = "$appResourcesPath/Android/before-plugins.gradle"
def beforePluginGradle = file(pathToBeforePluginGradle)
if (beforePluginGradle.exists()) {
println "\t + applying user-defined configuration from ${beforePluginGradle}"
apply from: pathToBeforePluginGradle
}
}

def applyAppGradleConfiguration = { ->
def appResourcesPath = getAppResourcesPath()
Expand Down Expand Up @@ -212,8 +222,9 @@ android {
}

setAppIdentifier()
applyAppGradleConfiguration()
applyBeforePluginGradleConfiguration()
applyPluginGradleConfigurations()
applyAppGradleConfiguration()
}

def externalRuntimeExists = !findProject(':runtime').is(null)
Expand Down Expand Up @@ -251,6 +262,8 @@ dependencies {
supportVer = supportVersion
}

println "Using support library version $supportVer"

implementation "com.android.support:multidex:1.0.2"
implementation "com.android.support:support-v4:$supportVer"
implementation "com.android.support:appcompat-v7:$supportVer"
Expand Down Expand Up @@ -477,14 +490,16 @@ task buildMetadata(type: JavaExec) {
description "builds metadata with provided jar dependencies"

inputs.files("$MDG_JAVA_DEPENDENCIES")
inputs.dir("$buildDir/intermediates/classes")

def classesDir = "$buildDir/intermediates/javac"
inputs.dir(classesDir)

outputs.files("$METADATA_OUT_PATH/treeNodeStream.dat", "$METADATA_OUT_PATH/treeStringsStream.dat", "$METADATA_OUT_PATH/treeValueStream.dat")

doFirst {
// get compiled classes to pass to metadata generator
// these need to be called after the classes have compiled
def classesDir = "$buildDir/intermediates/classes"
assert file(classesDir).exists()

def classesSubDirs = new File(classesDir).listFiles()
def selectedBuildType = project.ext.selectedBuildType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public void run() {
deviceSystemSocket = new LocalServerSocket(this.name);
while (running) {
LocalSocket systemSocket = deviceSystemSocket.accept();
systemSocket.setSoTimeout(70000);
livesyncWorker = new LiveSyncWorker(systemSocket);
Thread liveSyncThread = setUpLivesyncThread();
liveSyncThread.start();
Expand Down Expand Up @@ -116,7 +115,7 @@ private class LiveSyncWorker implements Runnable {
public static final String FILE_CONTENT = "fileContent";
public static final String FILE_CONTENT_LENGTH = FILE_CONTENT + "Length";
public static final int DEFAULT_OPERATION = -1;
private static final String PROTOCOL_VERSION = "0.1.0";
private static final String PROTOCOL_VERSION = "0.2.0";
private byte[] handshakeMessage;
private final DigestInputStream input;
private Closeable livesyncSocket;
Expand Down
Binary file modified test-app/app/src/main/assets/app/modules/libCalc-arm.so
Binary file not shown.
Binary file modified test-app/app/src/main/assets/app/modules/libCalc-arm64.so
Binary file not shown.
Binary file modified test-app/app/src/main/assets/app/modules/libCalc-x86.so
Binary file not shown.
78 changes: 45 additions & 33 deletions test-app/app/src/main/assets/app/tests/testsWithContext.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
exports.run = function(cntxt)
{
describe("Tests with context ", function () {

var context = cntxt;
var myCustomEquality = function(first, second) {
return first == second;
};

beforeEach(function() {
jasmine.addCustomEqualityTester(myCustomEquality);
});

it("TestConstructorOverrideForBuiltinType", function () {

__log("TEST: TestConstructorOverrideForBuiltinType");

var ctorCalled = false;
var isConstructor = false;

Expand All @@ -24,48 +24,48 @@ exports.run = function(cntxt)
isConstructor = arguments[arguments.length - 1];
}
});

var btn = new MyButton(context);

expect(ctorCalled).toEqual(true);
expect(isConstructor).toEqual(true);
});

it("TestConstructorOverrideForBuiltinTypeWithInitMethod", function () {

__log("TEST: TestConstructorOverrideForBuiltinTypeWithInitMethod");

var initInvocationCount = 0;

var MyDatePicker = android.widget.DatePicker.extend({
init: function() {
++initInvocationCount;
}
});

var datePicker = new MyDatePicker(context);

__log("datePicker=" + datePicker);

var count1 = initInvocationCount;

expect(count1).toBeGreaterThan(0);

datePicker.init(2014, 3, 25, null);

var count2 = initInvocationCount;

expect(count2).toBeGreaterThan(count1);
});

it("TestBuiltinNestedClassCreation", function () {

__log("TEST: TestBuiltinNestedClassCreation");

var loader = new android.content.Loader(context);

var observer = new android.content.Loader.ForceLoadContentObserver(loader);

expect(observer).not.toEqual(null);
});

Expand All @@ -82,35 +82,47 @@ exports.run = function(cntxt)

expect(exceptionCaught).toBe(true);
});

it("TestPublicWindowManagerImplWithoutMetadata", function () {

__log("TEST: TestPublicWindowManagerImplWithoutMetadata");

var windowManagerImpl = context.getSystemService(android.content.Context.WINDOW_SERVICE);

var display = windowManagerImpl.getDefaultDisplay();

//__log("display.isValid=" + display.isValid());

var displayInfo = display.toString();

expect(displayInfo.length).toBeGreaterThan(0);
});

it("TestCanPassCharSequenceArray", function () {

__log("TEST: TestCanPassCharSequenceArray");

var alert = new android.app.AlertDialog.Builder(context);

var builder = alert.setItems(["One", "Two" ], new android.content.DialogInterface.OnClickListener({
onClick: function (dialog, which) {
//
}
}));

expect(builder).not.toEqual(null);
});

it("TestOldAPIForGettingMethodsListForMethodsWithParametersFromMissingType", function () {
__log("TEST: TestOldAPIForGettingMethodsListForMethodsWithParametersFromMissingType");

var til = new android.support.design.widget.TextInputLayout(context);
var editText = new android.widget.EditText(context);
var relativeLayout = new android.widget.RelativeLayout(context);
var relativeLayoutParams = new android.widget.RelativeLayout.LayoutParams(android.widget.RelativeLayout.LayoutParams.MATCH_PARENT, android.widget.RelativeLayout.LayoutParams.MATCH_PARENT);
relativeLayout.setLayoutParams(relativeLayoutParams);
editText.setHint("TEST");
til.addView(editText);
});
});
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.android.tools.build:gradle:3.1.4'
}
}

Expand Down
Loading