Skip to content

Commit edd4f6e

Browse files
committed
inital setup
1 parent 85debda commit edd4f6e

File tree

305 files changed

+32916
-2
lines changed

Some content is hidden

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

305 files changed

+32916
-2
lines changed

.idea/.name

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copyright/profiles_settings.xml

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

+21
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

+523
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

RUNTIME.iml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module external.linked.project.id="RUNTIME" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" external.system.module.group="" external.system.module.version="unspecified" type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="false">
4+
<output url="file://$MODULE_DIR$/build" />
5+
<output-test url="file://$MODULE_DIR$/build" />
6+
<exclude-output />
7+
<content url="file://$MODULE_DIR$">
8+
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
9+
<excludeFolder url="file://$MODULE_DIR$/build" />
10+
</content>
11+
<orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
12+
<orderEntry type="sourceFolder" forTests="false" />
13+
</component>
14+
</module>

test-app/runtimedebug/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

test-app/runtimedebug/build.gradle

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
apply plugin: 'com.android.model.application'
2+
3+
import groovy.json.JsonSlurper //used to parse package.json
4+
5+
model {
6+
android {
7+
compileSdkVersion = 23
8+
buildToolsVersion = "23.0.3"
9+
10+
defaultConfig.with {
11+
applicationId = "org.nativescript.runtimedebug"
12+
minSdkVersion.apiLevel = 17
13+
targetSdkVersion.apiLevel = 22
14+
versionCode = 1
15+
versionName = "1.0"
16+
}
17+
18+
lintOptions.with {
19+
abortOnError = false
20+
}
21+
}
22+
23+
android.buildTypes {
24+
release {
25+
minifyEnabled = false
26+
proguardFiles.add(file('proguard-rules.txt'))
27+
}
28+
}
29+
}
30+
31+
dependencies {
32+
compile project(':runtime')
33+
compile project(':binding-generator')
34+
compile fileTree(dir: 'libs', include: ['*.jar'])
35+
testCompile 'junit:junit:4.12'
36+
compile 'com.android.support:appcompat-v7:23.3.0'
37+
compile "com.android.support:support-v4:23.3.0"
38+
}
39+
40+
repositories {
41+
flatDir {
42+
dirs 'src/F0', 'src/F1',
43+
'src/F2', 'src/F3',
44+
'src/F4', 'src/F5',
45+
'src/F6', 'src/F7',
46+
'src/F8', 'src/F9',
47+
'src/F10', 'src/F11'
48+
}
49+
}
50+
51+
task addAarDependencies {
52+
FileTree tree = fileTree(dir: "$projectDir/src", include: ["**/*.aar"])
53+
tree.each { File file ->
54+
// remove the extension of the file (.aar)
55+
def length = file.name.length() - 4
56+
def fileName = file.name[0..<length]
57+
println "\t+adding dependency: " + file.getAbsolutePath()
58+
project.dependencies.add("compile", [name: fileName, ext: "aar"])
59+
}
60+
}
61+
62+
def isWinOs = System.properties['os.name'].toLowerCase().contains('windows')
63+
64+
/////////////////////////////// installing application ////////////////////////////
65+
66+
task installApk(type: Exec) {
67+
doFirst {
68+
println "Attempting to install buit apk"
69+
70+
if (isWinOs) {
71+
commandLine "cmd", "/c", "node", "$rootDir\\tools\\deploy-apk.js", "$rootDir\\runtimedebug\\build\\outputs\\apk\\app-debug.apk"
72+
} else {
73+
commandLine "node", "$rootDir/tools/deploy-apk.js", "$rootDir/runtimedebug/build/outputs/apk/app-debug.apk"
74+
}
75+
}
76+
77+
doLast {
78+
println "Install result:" + execResult
79+
}
80+
}
81+
82+
task startInstalledApk(type: Exec) {
83+
doFirst {
84+
println "Starting test application"
85+
86+
if (isWinOs) {
87+
commandLine "cmd", "/c", "adb", "shell", "am", "start", "-n", "org.nativescript.runtimedebug/com.tns.NativeScriptActivity", "-a", "android.intent.action.MAIN", "-c", "android.intent.category.LAUNCHER"
88+
} else {
89+
commandLine "adb", "shell", "am", "start", "-n", "org.nativescript.runtimedebug/com.tns.NativeScriptActivity", "-a", "android.intent.action.MAIN", "-c", "android.intent.category.LAUNCHER"
90+
}
91+
}
92+
}
93+
94+
startInstalledApk.dependsOn(installApk)
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in C:\Android\sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
4+
<uses-permission android:name="android.permission.CAMERA"/>
5+
<uses-permission android:name="android.permission.FLASHLIGHT"/>
6+
7+
<uses-feature android:name="android.hardware.camera" android:required="false" />
8+
9+
<application>
10+
<activity
11+
android:name="com.google.zxing.client.android.CaptureActivity"
12+
android:clearTaskOnLaunch="true"
13+
android:configChanges="keyboardHidden|orientation|screenSize"
14+
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
15+
android:windowSoftInputMode="stateAlwaysHidden"
16+
android:exported="false">
17+
<intent-filter>
18+
<action android:name="com.google.zxing.client.android.SCAN"/>
19+
<category android:name="android.intent.category.DEFAULT"/>
20+
</intent-filter>
21+
</activity>
22+
</application>
23+
24+
</manifest>
Binary file not shown.
76.1 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="org.nativescript.bb1"
4+
android:versionCode="1"
5+
android:versionName="1.0">
6+
7+
<supports-screens
8+
android:smallScreens="true"
9+
android:normalScreens="true"
10+
android:largeScreens="true"
11+
android:xlargeScreens="true"/>
12+
13+
<uses-sdk
14+
android:minSdkVersion="17"
15+
android:targetSdkVersion="23"/>
16+
17+
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
18+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
19+
<uses-permission android:name="android.permission.INTERNET"/>
20+
21+
<application
22+
android:name="com.tns.NativeScriptApplication"
23+
android:allowBackup="true"
24+
android:icon="@drawable/icon"
25+
android:label="@string/app_name"
26+
android:theme="@style/AppTheme" >
27+
<activity
28+
android:name="com.tns.NativeScriptActivity"
29+
android:label="@string/title_activity_kimera"
30+
android:configChanges="keyboardHidden|orientation|screenSize">
31+
32+
<intent-filter>
33+
<action android:name="android.intent.action.MAIN" />
34+
35+
<category android:name="android.intent.category.LAUNCHER" />
36+
</intent-filter>
37+
</activity>
38+
<activity android:name="com.tns.ErrorReportActivity"/>
39+
</application>
40+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.title {
2+
font-size: 30;
3+
horizontal-align: center;
4+
margin: 20;
5+
}
6+
7+
button {
8+
font-size: 42;
9+
horizontal-align: center;
10+
}
11+
12+
.message {
13+
font-size: 20;
14+
color: #284848;
15+
horizontal-align: center;
16+
margin: 0 20;
17+
text-align: center;
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
var application = require("application");
2+
application.start({ moduleName: "main-page" });
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
var createViewModel = require("./main-view-model").createViewModel;
2+
3+
function onNavigatingTo(args) {
4+
var page = args.object;
5+
page.bindingContext = createViewModel();
6+
}
7+
exports.onNavigatingTo = onNavigatingTo;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="onNavigatingTo">
2+
<StackLayout>
3+
<Label text="Tap the button" class="title"/>
4+
<Button text="TAP" tap="{{ onTap }}" />
5+
<Label text="{{ message }}" class="message" textWrap="true"/>
6+
</StackLayout>
7+
</Page>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
var Observable = require("data/observable").Observable;
2+
3+
function getMessage(counter) {
4+
if (counter <= 0) {
5+
return "Hoorraaay! You unlocked the NativeScript clicker achievement!";
6+
} else {
7+
return counter + " taps left";
8+
}
9+
}
10+
11+
function createViewModel() {
12+
var viewModel = new Observable();
13+
viewModel.counter = 42;
14+
viewModel.message = getMessage(viewModel.counter);
15+
16+
viewModel.onTap = function() {
17+
this.counter--;
18+
this.set("message", getMessage(this.counter));
19+
}
20+
21+
return viewModel;
22+
}
23+
24+
exports.createViewModel = createViewModel;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"name":"tns-template-hello-world","main":"app.js","version":"2.1.0","author":{"name":"Telerik","email":"[email protected]"},"description":"Nativescript hello-world project template","license":"Apache-2.0","keywords":["telerik","mobile","nativescript","{N}","tns","appbuilder","template"],"repository":{"type":"git","url":"git://github.com/NativeScript/template-hello-world.git"},"bugs":{"url":"https://github.com/NativeScript/template-hello-world/issues"},"homepage":"https://github.com/NativeScript/template-hello-world","android":{"v8Flags":"--expose_gc"},"readme":"ERROR: No README data found!","_id":"[email protected]","_from":"[email protected]"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference path="../node_modules/tns-core-modules/tns-core-modules.d.ts" /> Enable smart suggestions and completions in Visual Studio Code JavaScript projects.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Copyright (c) 2015-2016 Telerik AD
2+
3+
Licensed under the Apache License, Version 2.0 (the "License");
4+
you may not use this file except in compliance with the License.
5+
You may obtain a copy of the License at
6+
7+
http://www.apache.org/licenses/LICENSE-2.0
8+
9+
Unless required by applicable law or agreed to in writing, software
10+
distributed under the License is distributed on an "AS IS" BASIS,
11+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
See the License for the specific language governing permissions and
13+
limitations under the License.

0 commit comments

Comments
 (0)