aboutsummaryrefslogtreecommitdiffstats
path: root/testapps/javaProjectTest
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2012-03-02 13:57:08 -0800
committerXavier Ducrohet <xav@android.com>2012-03-02 14:19:12 -0800
commit35803ee3b4362248489db1dd1fc6d483f3c3ee65 (patch)
treebd26c3f561390247b9af0eac7b26ff3c947d5502 /testapps/javaProjectTest
parent81c5fb5448a6342cb3bb29ea501fccf95573288c (diff)
downloadsdk-35803ee3b4362248489db1dd1fc6d483f3c3ee65.zip
sdk-35803ee3b4362248489db1dd1fc6d483f3c3ee65.tar.gz
sdk-35803ee3b4362248489db1dd1fc6d483f3c3ee65.tar.bz2
More fixes to the test projects.
- add eclipse files for a bunch of them - package name refactoring to match the folder structure somehow (more need this) - updated the javaproject to have an extra java project and to have code that access java resources to test packaging too. Change-Id: Ie13842c1b891e495e04d8a157a12cac9db13f30e
Diffstat (limited to 'testapps/javaProjectTest')
-rw-r--r--testapps/javaProjectTest/ECLIPSEONLY0
-rw-r--r--testapps/javaProjectTest/SUCCESS0
-rw-r--r--testapps/javaProjectTest/app/.project2
-rw-r--r--testapps/javaProjectTest/app/AndroidManifest.xml4
-rw-r--r--testapps/javaProjectTest/app/res/layout/main.xml60
-rw-r--r--testapps/javaProjectTest/app/src/com/android/tests/basicProjectWithJava/Main.java22
-rw-r--r--testapps/javaProjectTest/app/src/com/android/tests/basicProjectWithJava/MyTextView.java27
-rw-r--r--testapps/javaProjectTest/app/src/com/android/tests/javaprojecttest/app/Main.java38
-rw-r--r--testapps/javaProjectTest/javaProject/.classpath2
-rw-r--r--testapps/javaProjectTest/javaProject/.project2
-rw-r--r--testapps/javaProjectTest/javaProject/libs/basicJar.jarbin2886 -> 0 bytes
-rw-r--r--testapps/javaProjectTest/javaProject/src/com/android/tests/basicJavaProject/Foo.java16
-rw-r--r--testapps/javaProjectTest/javaProject/src/com/android/tests/basicJavaProject/foo.txt1
-rw-r--r--testapps/javaProjectTest/javaProject/src/com/android/tests/javaprojecttest/javaproject/JavaProject.java30
-rw-r--r--testapps/javaProjectTest/javaProject/src/com/android/tests/javaprojecttest/javaproject/JavaProject.txt1
-rw-r--r--testapps/javaProjectTest/javaProject2/.classpath7
-rw-r--r--testapps/javaProjectTest/javaProject2/.project17
-rw-r--r--testapps/javaProjectTest/javaProject2/libs/basicJar.jarbin0 -> 1813 bytes
-rw-r--r--testapps/javaProjectTest/javaProject2/src/com/android/tests/javaprojecttest/javaproject2/JavaProject2.java30
-rw-r--r--testapps/javaProjectTest/javaProject2/src/com/android/tests/javaprojecttest/javaproject2/JavaProject2.txt1
-rw-r--r--testapps/javaProjectTest/lib1/.classpath2
-rw-r--r--testapps/javaProjectTest/lib1/.project2
-rw-r--r--testapps/javaProjectTest/lib1/AndroidManifest.xml20
-rw-r--r--testapps/javaProjectTest/lib1/ant.properties17
-rw-r--r--testapps/javaProjectTest/lib1/build.xml83
-rw-r--r--testapps/javaProjectTest/lib1/src/com/android/tests/javaprojecttest/lib1/Lib1.java30
-rw-r--r--testapps/javaProjectTest/lib1/src/com/android/tests/javaprojecttest/lib1/Lib1.txt1
-rw-r--r--testapps/javaProjectTest/lib1/src/com/android/tests/javaprojecttest/lib1/Main.java (renamed from testapps/javaProjectTest/lib2/src/com/android/test/lib2/Main.java)2
-rw-r--r--testapps/javaProjectTest/lib2/.classpath2
-rw-r--r--testapps/javaProjectTest/lib2/.project2
-rw-r--r--testapps/javaProjectTest/lib2/AndroidManifest.xml20
-rw-r--r--testapps/javaProjectTest/lib2/ant.properties17
-rw-r--r--testapps/javaProjectTest/lib2/build.xml83
-rw-r--r--testapps/javaProjectTest/lib2/src/com/android/tests/javaprojecttest/lib2/Lib2.java30
-rw-r--r--testapps/javaProjectTest/lib2/src/com/android/tests/javaprojecttest/lib2/Lib2.txt1
-rw-r--r--testapps/javaProjectTest/lib2/src/com/android/tests/javaprojecttest/lib2/Main.java (renamed from testapps/javaProjectTest/lib1/src/com/android/test/lib1/Main.java)2
36 files changed, 269 insertions, 305 deletions
diff --git a/testapps/javaProjectTest/ECLIPSEONLY b/testapps/javaProjectTest/ECLIPSEONLY
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/testapps/javaProjectTest/ECLIPSEONLY
diff --git a/testapps/javaProjectTest/SUCCESS b/testapps/javaProjectTest/SUCCESS
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/testapps/javaProjectTest/SUCCESS
diff --git a/testapps/javaProjectTest/app/.project b/testapps/javaProjectTest/app/.project
index 69b06f5..187fb0e 100644
--- a/testapps/javaProjectTest/app/.project
+++ b/testapps/javaProjectTest/app/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>app</name>
+ <name>javaProjectTest-app</name>
<comment></comment>
<projects>
</projects>
diff --git a/testapps/javaProjectTest/app/AndroidManifest.xml b/testapps/javaProjectTest/app/AndroidManifest.xml
index 0ccbb84..36ec8fb 100644
--- a/testapps/javaProjectTest/app/AndroidManifest.xml
+++ b/testapps/javaProjectTest/app/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.tests.basicProjectWithJava"
+ package="com.android.tests.javaprojecttest.app"
android:versionCode="1"
android:versionName="1.0" >
@@ -10,7 +10,7 @@
android:icon="@drawable/icon"
android:label="@string/app_name" >
<activity
- android:name="Main"
+ android:name="com.android.tests.javaprojecttest.app.Main"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
diff --git a/testapps/javaProjectTest/app/res/layout/main.xml b/testapps/javaProjectTest/app/res/layout/main.xml
index 670dd32..251905a 100644
--- a/testapps/javaProjectTest/app/res/layout/main.xml
+++ b/testapps/javaProjectTest/app/res/layout/main.xml
@@ -1,18 +1,50 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:orientation="vertical"
+ xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- >
-<TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:text="basicProjectWithJava"
- android:id="@+id/text"
- />
-<com.android.tests.basicProjectWithJava.MyTextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:id="@+id/text"
- />
-</LinearLayout>
+ android:orientation="vertical" >
+
+ <TextView
+ android:id="@+id/app"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="\\?"
+ tools:ignore="HardcodedText" />
+
+ <TextView
+ android:id="@+id/lib1"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="\\?"
+ tools:ignore="HardcodedText" />
+
+ <TextView
+ android:id="@+id/lib2"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="\\?"
+ tools:ignore="HardcodedText" />
+
+ <TextView
+ android:id="@+id/javaProject1"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="\\?"
+ tools:ignore="HardcodedText" />
+
+ <TextView
+ android:id="@+id/javaProject2"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="\\?"
+ tools:ignore="HardcodedText" />
+
+ <TextView
+ android:id="@+id/basicJar"
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="\\?"
+ tools:ignore="HardcodedText" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/testapps/javaProjectTest/app/src/com/android/tests/basicProjectWithJava/Main.java b/testapps/javaProjectTest/app/src/com/android/tests/basicProjectWithJava/Main.java
deleted file mode 100644
index eb6be25..0000000
--- a/testapps/javaProjectTest/app/src/com/android/tests/basicProjectWithJava/Main.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.android.tests.basicProjectWithJava;
-
-import com.android.tests.basicJavaProject.Foo;
-
-import android.app.Activity;
-import android.os.Bundle;
-import android.widget.TextView;
-
-public class Main extends Activity {
- /** Called when the activity is first created. */
- @Override
- public void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.main);
-
- Foo foo = new Foo();
-
- TextView tv = (TextView) findViewById(R.id.text);
- tv.setText("basicProjectWithJava\nvalue from java project:" + foo.getRandomFoo());
- }
-
-} \ No newline at end of file
diff --git a/testapps/javaProjectTest/app/src/com/android/tests/basicProjectWithJava/MyTextView.java b/testapps/javaProjectTest/app/src/com/android/tests/basicProjectWithJava/MyTextView.java
deleted file mode 100644
index ae35dca..0000000
--- a/testapps/javaProjectTest/app/src/com/android/tests/basicProjectWithJava/MyTextView.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.android.tests.basicProjectWithJava;
-
-import com.android.tests.basicJavaProject.Foo;
-
-import android.content.Context;
-import android.util.AttributeSet;
-import android.widget.TextView;
-
-public class MyTextView extends TextView {
-
- public MyTextView(Context context, AttributeSet attrs, int defStyle) {
- super(context, attrs, defStyle);
-
- Foo f = new Foo();
- setText("Foo: " + f.getRandomFoo());
- }
-
- public MyTextView(Context context, AttributeSet attrs) {
- super(context, attrs);
- Foo f = new Foo();
- setText("Foo: " + f.getRandomFoo());
- }
-
- public MyTextView(Context context) {
- super(context);
- }
-}
diff --git a/testapps/javaProjectTest/app/src/com/android/tests/javaprojecttest/app/Main.java b/testapps/javaProjectTest/app/src/com/android/tests/javaprojecttest/app/Main.java
new file mode 100644
index 0000000..233989e
--- /dev/null
+++ b/testapps/javaProjectTest/app/src/com/android/tests/javaprojecttest/app/Main.java
@@ -0,0 +1,38 @@
+package com.android.tests.javaprojecttest.app;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.widget.TextView;
+
+import com.android.tests.basicjar.BasicJar;
+import com.android.tests.javaprojecttest.javaproject.JavaProject;
+import com.android.tests.javaprojecttest.javaproject2.JavaProject2;
+import com.android.tests.javaprojecttest.lib1.Lib1;
+import com.android.tests.javaprojecttest.lib2.Lib2;
+
+public class Main extends Activity {
+ /** Called when the activity is first created. */
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main);
+
+ TextView tv = (TextView) findViewById(R.id.app);
+ tv.setText("app");
+
+ tv = (TextView) findViewById(R.id.lib1);
+ tv.setText("Lib1: " + Lib1.getContent());
+
+ tv = (TextView) findViewById(R.id.lib2);
+ tv.setText("Lib2: " + Lib2.getContent());
+
+ tv = (TextView) findViewById(R.id.javaProject1);
+ tv.setText("JavaProject: " + JavaProject.getContent());
+
+ tv = (TextView) findViewById(R.id.javaProject2);
+ tv.setText("JavaProject2: " + JavaProject2.getContent());
+
+ tv = (TextView) findViewById(R.id.basicJar);
+ tv.setText("BasicJar: " + BasicJar.getContent());
+ }
+} \ No newline at end of file
diff --git a/testapps/javaProjectTest/javaProject/.classpath b/testapps/javaProjectTest/javaProject/.classpath
index 139d9a3..fef3993 100644
--- a/testapps/javaProjectTest/javaProject/.classpath
+++ b/testapps/javaProjectTest/javaProject/.classpath
@@ -2,6 +2,6 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="lib" path="libs/basicJar.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/javaProjectTest-javaProject2"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/testapps/javaProjectTest/javaProject/.project b/testapps/javaProjectTest/javaProject/.project
index 225e486..8d99b08 100644
--- a/testapps/javaProjectTest/javaProject/.project
+++ b/testapps/javaProjectTest/javaProject/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>javaProject</name>
+ <name>javaProjectTest-javaProject</name>
<comment></comment>
<projects>
</projects>
diff --git a/testapps/javaProjectTest/javaProject/libs/basicJar.jar b/testapps/javaProjectTest/javaProject/libs/basicJar.jar
deleted file mode 100644
index 0b9c60c..0000000
--- a/testapps/javaProjectTest/javaProject/libs/basicJar.jar
+++ /dev/null
Binary files differ
diff --git a/testapps/javaProjectTest/javaProject/src/com/android/tests/basicJavaProject/Foo.java b/testapps/javaProjectTest/javaProject/src/com/android/tests/basicJavaProject/Foo.java
deleted file mode 100644
index 4a7d31c..0000000
--- a/testapps/javaProjectTest/javaProject/src/com/android/tests/basicJavaProject/Foo.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package com.android.tests.basicJavaProject;
-
-import java.util.Random;
-
-public class Foo {
- public static int FOO = 42;
-
- public int getFoo() {
- return FOO;
- }
-
- public int getRandomFoo() {
- Random r = new Random(System.currentTimeMillis());
- return r.nextInt(FOO);
- }
-}
diff --git a/testapps/javaProjectTest/javaProject/src/com/android/tests/basicJavaProject/foo.txt b/testapps/javaProjectTest/javaProject/src/com/android/tests/basicJavaProject/foo.txt
deleted file mode 100644
index 1c33723..0000000
--- a/testapps/javaProjectTest/javaProject/src/com/android/tests/basicJavaProject/foo.txt
+++ /dev/null
@@ -1 +0,0 @@
-blah blah \ No newline at end of file
diff --git a/testapps/javaProjectTest/javaProject/src/com/android/tests/javaprojecttest/javaproject/JavaProject.java b/testapps/javaProjectTest/javaProject/src/com/android/tests/javaprojecttest/javaproject/JavaProject.java
new file mode 100644
index 0000000..4f40648
--- /dev/null
+++ b/testapps/javaProjectTest/javaProject/src/com/android/tests/javaprojecttest/javaproject/JavaProject.java
@@ -0,0 +1,30 @@
+package com.android.tests.javaprojecttest.javaproject;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+public class JavaProject {
+
+ public static String getContent() {
+ InputStream input = JavaProject.class.getResourceAsStream("JavaProject.txt");
+
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new InputStreamReader(input, "UTF-8"));
+
+ return reader.readLine();
+ } catch (IOException e) {
+ } finally {
+ if (reader != null) {
+ try {
+ reader.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+
+ return "FAILED TO READ CONTENT";
+ }
+}
diff --git a/testapps/javaProjectTest/javaProject/src/com/android/tests/javaprojecttest/javaproject/JavaProject.txt b/testapps/javaProjectTest/javaProject/src/com/android/tests/javaprojecttest/javaproject/JavaProject.txt
new file mode 100644
index 0000000..5742eaa
--- /dev/null
+++ b/testapps/javaProjectTest/javaProject/src/com/android/tests/javaprojecttest/javaproject/JavaProject.txt
@@ -0,0 +1 @@
+SUCCESS from javaProject \ No newline at end of file
diff --git a/testapps/javaProjectTest/javaProject2/.classpath b/testapps/javaProjectTest/javaProject2/.classpath
new file mode 100644
index 0000000..139d9a3
--- /dev/null
+++ b/testapps/javaProjectTest/javaProject2/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="lib" path="libs/basicJar.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/testapps/javaProjectTest/javaProject2/.project b/testapps/javaProjectTest/javaProject2/.project
new file mode 100644
index 0000000..70658ff
--- /dev/null
+++ b/testapps/javaProjectTest/javaProject2/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>javaProjectTest-javaProject2</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/testapps/javaProjectTest/javaProject2/libs/basicJar.jar b/testapps/javaProjectTest/javaProject2/libs/basicJar.jar
new file mode 100644
index 0000000..a81b929
--- /dev/null
+++ b/testapps/javaProjectTest/javaProject2/libs/basicJar.jar
Binary files differ
diff --git a/testapps/javaProjectTest/javaProject2/src/com/android/tests/javaprojecttest/javaproject2/JavaProject2.java b/testapps/javaProjectTest/javaProject2/src/com/android/tests/javaprojecttest/javaproject2/JavaProject2.java
new file mode 100644
index 0000000..05d6c85
--- /dev/null
+++ b/testapps/javaProjectTest/javaProject2/src/com/android/tests/javaprojecttest/javaproject2/JavaProject2.java
@@ -0,0 +1,30 @@
+package com.android.tests.javaprojecttest.javaproject2;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+public class JavaProject2 {
+
+ public static String getContent() {
+ InputStream input = JavaProject2.class.getResourceAsStream("JavaProject2.txt");
+
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new InputStreamReader(input, "UTF-8"));
+
+ return reader.readLine();
+ } catch (IOException e) {
+ } finally {
+ if (reader != null) {
+ try {
+ reader.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+
+ return "FAILED TO READ CONTENT";
+ }
+}
diff --git a/testapps/javaProjectTest/javaProject2/src/com/android/tests/javaprojecttest/javaproject2/JavaProject2.txt b/testapps/javaProjectTest/javaProject2/src/com/android/tests/javaprojecttest/javaproject2/JavaProject2.txt
new file mode 100644
index 0000000..6ab43f7
--- /dev/null
+++ b/testapps/javaProjectTest/javaProject2/src/com/android/tests/javaprojecttest/javaproject2/JavaProject2.txt
@@ -0,0 +1 @@
+SUCCESS from javaProject2 \ No newline at end of file
diff --git a/testapps/javaProjectTest/lib1/.classpath b/testapps/javaProjectTest/lib1/.classpath
index 71cf1b1..8917f25 100644
--- a/testapps/javaProjectTest/lib1/.classpath
+++ b/testapps/javaProjectTest/lib1/.classpath
@@ -4,7 +4,7 @@
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
- <classpathentry combineaccessrules="false" kind="src" path="/javaProject"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/javaProjectTest-javaProject"/>
<classpathentry kind="lib" path="libs/android-support-v4.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
diff --git a/testapps/javaProjectTest/lib1/.project b/testapps/javaProjectTest/lib1/.project
index 596b85d..cac8ac1 100644
--- a/testapps/javaProjectTest/lib1/.project
+++ b/testapps/javaProjectTest/lib1/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>Lib1</name>
+ <name>javaProjectTest-Lib1</name>
<comment></comment>
<projects>
</projects>
diff --git a/testapps/javaProjectTest/lib1/AndroidManifest.xml b/testapps/javaProjectTest/lib1/AndroidManifest.xml
index 196db0b..c51696b 100644
--- a/testapps/javaProjectTest/lib1/AndroidManifest.xml
+++ b/testapps/javaProjectTest/lib1/AndroidManifest.xml
@@ -1,15 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.test.lib1"
- android:versionCode="1"
- android:versionName="1.0">
- <application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
- <activity android:name="Main"
- android:label="@string/app_name">
+ package="com.android.tests.javaprojecttest.lib1"
+ android:versionCode="1"
+ android:versionName="1.0" >
+
+ <application
+ android:icon="@drawable/ic_launcher"
+ android:label="@string/app_name" >
+ <activity
+ android:name=".Main"
+ android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
+
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
-</manifest>
+
+</manifest> \ No newline at end of file
diff --git a/testapps/javaProjectTest/lib1/ant.properties b/testapps/javaProjectTest/lib1/ant.properties
deleted file mode 100644
index b0971e8..0000000
--- a/testapps/javaProjectTest/lib1/ant.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# This file is used to override default values used by the Ant build system.
-#
-# This file must be checked into Version Control Systems, as it is
-# integral to the build system of your project.
-
-# This file is only used by the Ant script.
-
-# You can use this to override default values such as
-# 'source.dir' for the location of your java source folder and
-# 'out.dir' for the location of your output folder.
-
-# You can also use it define how the release builds are signed by declaring
-# the following properties:
-# 'key.store' for the location of your keystore and
-# 'key.alias' for the name of the key to use.
-# The password will be asked during the build when you use the 'release' target.
-
diff --git a/testapps/javaProjectTest/lib1/build.xml b/testapps/javaProjectTest/lib1/build.xml
deleted file mode 100644
index 2a15ae6..0000000
--- a/testapps/javaProjectTest/lib1/build.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="lib1" 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" />
-
- <!-- 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 an env var"
- 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>
diff --git a/testapps/javaProjectTest/lib1/src/com/android/tests/javaprojecttest/lib1/Lib1.java b/testapps/javaProjectTest/lib1/src/com/android/tests/javaprojecttest/lib1/Lib1.java
new file mode 100644
index 0000000..b1e7702
--- /dev/null
+++ b/testapps/javaProjectTest/lib1/src/com/android/tests/javaprojecttest/lib1/Lib1.java
@@ -0,0 +1,30 @@
+package com.android.tests.javaprojecttest.lib1;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+public class Lib1 {
+
+ public static String getContent() {
+ InputStream input = Lib1.class.getResourceAsStream("Lib1.txt");
+
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new InputStreamReader(input, "UTF-8"));
+
+ return reader.readLine();
+ } catch (IOException e) {
+ } finally {
+ if (reader != null) {
+ try {
+ reader.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+
+ return "FAILED TO READ CONTENT";
+ }
+}
diff --git a/testapps/javaProjectTest/lib1/src/com/android/tests/javaprojecttest/lib1/Lib1.txt b/testapps/javaProjectTest/lib1/src/com/android/tests/javaprojecttest/lib1/Lib1.txt
new file mode 100644
index 0000000..b3e210d
--- /dev/null
+++ b/testapps/javaProjectTest/lib1/src/com/android/tests/javaprojecttest/lib1/Lib1.txt
@@ -0,0 +1 @@
+SUCCESS from Lib1 \ No newline at end of file
diff --git a/testapps/javaProjectTest/lib2/src/com/android/test/lib2/Main.java b/testapps/javaProjectTest/lib1/src/com/android/tests/javaprojecttest/lib1/Main.java
index 45dad32..f09e1cd 100644
--- a/testapps/javaProjectTest/lib2/src/com/android/test/lib2/Main.java
+++ b/testapps/javaProjectTest/lib1/src/com/android/tests/javaprojecttest/lib1/Main.java
@@ -1,4 +1,4 @@
-package com.android.test.lib2;
+package com.android.tests.javaprojecttest.lib1;
import android.app.Activity;
import android.os.Bundle;
diff --git a/testapps/javaProjectTest/lib2/.classpath b/testapps/javaProjectTest/lib2/.classpath
index 71cf1b1..8917f25 100644
--- a/testapps/javaProjectTest/lib2/.classpath
+++ b/testapps/javaProjectTest/lib2/.classpath
@@ -4,7 +4,7 @@
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
- <classpathentry combineaccessrules="false" kind="src" path="/javaProject"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/javaProjectTest-javaProject"/>
<classpathentry kind="lib" path="libs/android-support-v4.jar"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
diff --git a/testapps/javaProjectTest/lib2/.project b/testapps/javaProjectTest/lib2/.project
index 2b723ab..63d7a48 100644
--- a/testapps/javaProjectTest/lib2/.project
+++ b/testapps/javaProjectTest/lib2/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>Lib2</name>
+ <name>javaProjectTest-Lib2</name>
<comment></comment>
<projects>
</projects>
diff --git a/testapps/javaProjectTest/lib2/AndroidManifest.xml b/testapps/javaProjectTest/lib2/AndroidManifest.xml
index cd7393c..10d4a00 100644
--- a/testapps/javaProjectTest/lib2/AndroidManifest.xml
+++ b/testapps/javaProjectTest/lib2/AndroidManifest.xml
@@ -1,15 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.test.lib2"
- android:versionCode="1"
- android:versionName="1.0">
- <application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
- <activity android:name="Main"
- android:label="@string/app_name">
+ package="com.android.tests.javaprojecttest.lib2"
+ android:versionCode="1"
+ android:versionName="1.0" >
+
+ <application
+ android:icon="@drawable/ic_launcher"
+ android:label="@string/app_name" >
+ <activity
+ android:name="com.android.tests.javaprojecttest.lib2.Main"
+ android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
+
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
-</manifest>
+
+</manifest> \ No newline at end of file
diff --git a/testapps/javaProjectTest/lib2/ant.properties b/testapps/javaProjectTest/lib2/ant.properties
deleted file mode 100644
index b0971e8..0000000
--- a/testapps/javaProjectTest/lib2/ant.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# This file is used to override default values used by the Ant build system.
-#
-# This file must be checked into Version Control Systems, as it is
-# integral to the build system of your project.
-
-# This file is only used by the Ant script.
-
-# You can use this to override default values such as
-# 'source.dir' for the location of your java source folder and
-# 'out.dir' for the location of your output folder.
-
-# You can also use it define how the release builds are signed by declaring
-# the following properties:
-# 'key.store' for the location of your keystore and
-# 'key.alias' for the name of the key to use.
-# The password will be asked during the build when you use the 'release' target.
-
diff --git a/testapps/javaProjectTest/lib2/build.xml b/testapps/javaProjectTest/lib2/build.xml
deleted file mode 100644
index 3d36fda..0000000
--- a/testapps/javaProjectTest/lib2/build.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="lib2" 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" />
-
- <!-- 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 an env var"
- 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>
diff --git a/testapps/javaProjectTest/lib2/src/com/android/tests/javaprojecttest/lib2/Lib2.java b/testapps/javaProjectTest/lib2/src/com/android/tests/javaprojecttest/lib2/Lib2.java
new file mode 100644
index 0000000..fecc780
--- /dev/null
+++ b/testapps/javaProjectTest/lib2/src/com/android/tests/javaprojecttest/lib2/Lib2.java
@@ -0,0 +1,30 @@
+package com.android.tests.javaprojecttest.lib2;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+
+public class Lib2 {
+
+ public static String getContent() {
+ InputStream input = Lib2.class.getResourceAsStream("Lib2.txt");
+
+ BufferedReader reader = null;
+ try {
+ reader = new BufferedReader(new InputStreamReader(input, "UTF-8"));
+
+ return reader.readLine();
+ } catch (IOException e) {
+ } finally {
+ if (reader != null) {
+ try {
+ reader.close();
+ } catch (IOException e) {
+ }
+ }
+ }
+
+ return "FAILED TO READ CONTENT";
+ }
+}
diff --git a/testapps/javaProjectTest/lib2/src/com/android/tests/javaprojecttest/lib2/Lib2.txt b/testapps/javaProjectTest/lib2/src/com/android/tests/javaprojecttest/lib2/Lib2.txt
new file mode 100644
index 0000000..3ba8e35
--- /dev/null
+++ b/testapps/javaProjectTest/lib2/src/com/android/tests/javaprojecttest/lib2/Lib2.txt
@@ -0,0 +1 @@
+SUCCESS from Lib2 \ No newline at end of file
diff --git a/testapps/javaProjectTest/lib1/src/com/android/test/lib1/Main.java b/testapps/javaProjectTest/lib2/src/com/android/tests/javaprojecttest/lib2/Main.java
index 116f14a..1459896 100644
--- a/testapps/javaProjectTest/lib1/src/com/android/test/lib1/Main.java
+++ b/testapps/javaProjectTest/lib2/src/com/android/tests/javaprojecttest/lib2/Main.java
@@ -1,4 +1,4 @@
-package com.android.test.lib1;
+package com.android.tests.javaprojecttest.lib2;
import android.app.Activity;
import android.os.Bundle;