Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy generator #22

Merged
merged 63 commits into from
Mar 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
70f334f
Initial commit
atanasovg Feb 5, 2015
a013a23
added gitattributes
Feb 5, 2015
a77dd72
initial commit
Feb 9, 2015
da585ee
description change
Feb 10, 2015
c596511
merged binding generator
Feb 5, 2015
f9793a6
merged binding generator tests changes
Feb 5, 2015
50f9ba5
removed merge backup file
Feb 5, 2015
a7b0fb5
added gitattributes
Feb 5, 2015
2cb5d34
changed project name
Feb 9, 2015
a391d25
Squashed 'binding-generator/' content from commit da585ee
Feb 11, 2015
9659c5e
Merge commit 'a391d253f29d2fe643b85d9765c8770dad1c2cf5' as 'binding-g…
Feb 11, 2015
be2ca74
fixed ts support function name and tests
Feb 11, 2015
dcc7490
fixed build and removed android support v4 lib
Feb 11, 2015
2318f37
removed gen classes
Feb 11, 2015
ecff00e
removed gen classes
Feb 11, 2015
e2c924e
fixed the implemented interfaces list for every proxy
Feb 16, 2015
c4f88c5
fixed the implemented interfaces list for every proxy
Feb 16, 2015
89f3fa2
change default binding package name
Feb 17, 2015
fc1f94d
change default binding package name
Feb 17, 2015
b11b729
changed default binding package name
Feb 17, 2015
923a4ab
forgotten metadata files with renamed binding package names
Feb 17, 2015
15487a4
clean up DexFactory
Feb 17, 2015
b1cc471
update project template with Android 5 material theme
Feb 17, 2015
aa21b63
remove duplicating logic in CreateInterfaceProxy
Feb 17, 2015
78da4fb
fixed binding generator tests with new default package binding name
Feb 17, 2015
7b406d1
fixed binding generator tests with new default package binding name
Feb 17, 2015
faa60e3
updated gitignore
Feb 17, 2015
2ac0ccb
Merge commit 'faa60e34f45f97c260df1be1c35a1efb25d9d2e1' into ProxyGen…
Feb 17, 2015
4b86a57
bump supported android sdk to 17
Feb 17, 2015
71febdc
add binding generator ant build files generation on build
Feb 18, 2015
0af7cd2
triger the creation of binding generator ant build files
Feb 18, 2015
ef1b0a3
do a clean release build
Feb 18, 2015
8d35dad
remove static bindings from build
Feb 19, 2015
b2ab3a0
resolved issue #37
Plamen5kov Feb 18, 2015
6acb1d2
add generator as library to the runtime for ant build
Feb 19, 2015
1df9796
fix generator lib build
Feb 19, 2015
65893d3
fix build for generator lib
Feb 19, 2015
f1b1dcc
removed dead code
Feb 19, 2015
9c0dfdc
made runtime a library project on build
Feb 20, 2015
a2006e0
add custom_rules.xml for build
Feb 20, 2015
a1302d0
fixed jar file exists checks
Feb 20, 2015
8df5f6e
one directory up to find the generator jar
Feb 20, 2015
5a0066f
kick the extra-jars before compile (otherwise it complains package-he…
Feb 20, 2015
f9c72c5
name the target correctly
Feb 20, 2015
550ffef
remove depends on package-helper
Feb 20, 2015
b2a6703
override "-package" target to correctly pass extenarl-jars
Feb 20, 2015
ea8d296
use ant task for building runtime + generator jar
Feb 20, 2015
2a36435
fixed compile depends name
Feb 20, 2015
02fda18
create post-compile to call create_runtime_jar
Feb 20, 2015
af25031
fix jar names and binding geenrator source dir
Feb 20, 2015
b571cd3
possible fix for invalid header field error
Feb 20, 2015
0e38643
fix for invalid header field error
Feb 20, 2015
0ca9b20
remove duplicate line in manifest
Feb 20, 2015
df47046
exclude generator gen files getting into runtime build
Feb 20, 2015
bc8cb32
another shot excluding duplicate class files
Feb 20, 2015
53eefea
exclude r* classes
Feb 20, 2015
9c9fb0d
copy runtime jar to dest dir
Feb 20, 2015
1f1be6a
copy support lib to libs dir of runtime so it can be found by metadat…
Feb 23, 2015
2619de7
throw js exception on extend fail instead of bringing down the app
Feb 24, 2015
10df80b
fix for extended typescript activities support
Mar 6, 2015
931f910
Merge pull request #24 from NativeScript/plamen5kov/issue#37
blagoev Mar 7, 2015
bd61f0b
resolved issue #54
Plamen5kov Mar 4, 2015
4818a83
reenable extendedClassesTests
Mar 7, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 22 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
22 changes: 22 additions & 0 deletions binding-generator/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp
*.sln merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
26 changes: 26 additions & 0 deletions binding-generator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Specify filepatterns you want git to ignore.

Example:
#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.bak
*.cache
*.ilk
*.log
[Bb]in
[Dd]ebug*/
*.sbr
obj/
[Rr]elease*/
_ReSharper*/
local.properties
R.java.d
9 changes: 9 additions & 0 deletions binding-generator/Generator/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
33 changes: 33 additions & 0 deletions binding-generator/Generator/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>android-binding-generator</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
291 changes: 291 additions & 0 deletions binding-generator/Generator/.settings/org.eclipse.jdt.core.prefs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
eclipse.preferences.version=1
formatter_profile=_Kimera
formatter_settings_version=12
20 changes: 20 additions & 0 deletions binding-generator/Generator/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tns.android.binding.generator"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="14" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >

<uses-library android:name="android.test.runner" />
</application>

</manifest>
1 change: 1 addition & 0 deletions binding-generator/Generator/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Android Binding Generator
92 changes: 92 additions & 0 deletions binding-generator/Generator/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="android-binding-generator" default="help">

<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<property file="local.properties" />

<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.
This is the place to change some Ant specific build properties.
Here are some properties you may want to change/update:

source.dir
The name of the source directory. Default is 'src'.
out.dir
The name of the output directory. Default is 'bin'.

For other overridable properties, look at the beginning of the rules
files in the SDK, at tools/ant/build.xml

Properties related to the SDK location or the project target should
be updated using the 'android' tool with the 'update' action.

This file is an integral part of the build system for your
application and should be checked into Version Control Systems.

-->
<property file="ant.properties" />

<!-- if sdk.dir was not set from one of the property file, then
get it from the ANDROID_HOME env var.
This must be done before we load project.properties since
the proguard config can use sdk.dir -->
<property environment="env" />
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
<isset property="env.ANDROID_HOME" />
</condition>

<!-- The project.properties file is created and updated by the 'android'
tool, as well as ADT.

This contains project specific properties such as project target, and library
dependencies. Lower level build properties are stored in ant.properties
(or in .classpath for Eclipse projects).

This file is an integral part of the build system for your
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />

<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
unless="sdk.dir"
/>

<!--
Import per project custom build rules if present at the root of the project.
This is the place to put custom intermediary targets such as:
-pre-build
-pre-compile
-post-compile (This is typically used for code obfuscation.
Compiled code location: ${out.classes.absolute.dir}
If this is not done in place, override ${out.dex.input.absolute.dir})
-post-package
-post-build
-pre-clean
-->
<import file="custom_rules.xml" optional="true" />

<!-- Import the actual build file.

To customize existing targets, there are two options:
- Customize only one target:
- copy/paste the target into this file, *before* the
<import> task.
- customize it to your needs.
- Customize the whole content of build.xml
- copy/paste the content of the rules files (minus the top node)
into this file, replacing the <import> task.
- customize to your needs.

***********************
****** IMPORTANT ******
***********************
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
in order to avoid having your file be overridden by tools such as "android update project"
-->
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** Automatically generated file. DO NOT MODIFY */
package com.tns.android.binding.generator;

public final class BuildConfig {
public final static boolean DEBUG = true;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/

package com.tns.android.binding.generator;

public final class R {
public static final class attr {
}
public static final class dimen {
/** Default screen margins, per the Android Design guidelines.

Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).

*/
public static int activity_horizontal_margin=0x7f040000;
public static int activity_vertical_margin=0x7f040001;
}
public static final class drawable {
public static int ic_launcher=0x7f020000;
}
public static final class id {
public static int action_settings=0x7f080002;
public static int button1=0x7f080001;
public static int container=0x7f080000;
}
public static final class layout {
public static int activity_main=0x7f030000;
public static int fragment_main=0x7f030001;
}
public static final class menu {
public static int main=0x7f070000;
}
public static final class string {
public static int action_settings=0x7f050003;
public static int app_name=0x7f050000;
public static int hello_world=0x7f050002;
public static int title_activity_main=0x7f050001;
}
public static final class style {
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.


Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.


Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.

API 11 theme customizations can go here.

Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.

API 14 theme customizations can go here.
*/
public static int AppBaseTheme=0x7f060000;
/** Application theme.
All customizations that are NOT specific to a particular API-level can go here.
*/
public static int AppTheme=0x7f060001;
}
}
Binary file added binding-generator/Generator/lib/asm-5.0.3.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions binding-generator/Generator/lint.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<lint>
</lint>
20 changes: 20 additions & 0 deletions binding-generator/Generator/proguard-project.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
15 changes: 15 additions & 0 deletions binding-generator/Generator/project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-17
android.library=true
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions binding-generator/Generator/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.tns.binding.tests.MainActivity"
tools:ignore="MergeRootFrame" >

<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />

</FrameLayout>

16 changes: 16 additions & 0 deletions binding-generator/Generator/res/layout/fragment_main.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.example.testandroidasmdex.MainActivity$PlaceholderFragment" >

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/hello_world" />

</RelativeLayout>
Loading