Skip to content

Commit ef064da

Browse files
committed
Using a gradle build setup
1 parent c0b690a commit ef064da

Some content is hidden

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

70 files changed

+65
-16
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
*.iml

build.gradle

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apply plugin: 'com.android.library'
2+
3+
android {
4+
compileSdkVersion 24
5+
buildToolsVersion "24.0.3"
6+
7+
defaultConfig {
8+
minSdkVersion 9
9+
targetSdkVersion 24
10+
versionCode 1
11+
versionName "1.0"
12+
13+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
14+
15+
}
16+
buildTypes {
17+
release {
18+
minifyEnabled false
19+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20+
}
21+
}
22+
}
23+
24+
dependencies {
25+
compile fileTree(dir: 'libs', include: ['*.jar'])
26+
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
27+
exclude group: 'com.android.support', module: 'support-annotations'
28+
})
29+
compile 'com.android.support:appcompat-v7:24.2.1'
30+
testCompile 'junit:junit:4.12'
31+
}

src/main/AndroidManifest.xml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.watabou">
4+
5+
<uses-sdk
6+
android:targetSdkVersion="20"/>
7+
8+
<application android:allowBackup="true" android:label="@string/app_name"
9+
android:supportsRtl="true">
10+
11+
</application>
12+
13+
</manifest>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

com/watabou/noosa/MovieClip.java src/main/java/com/watabou/noosa/MovieClip.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,6 @@ public Animation clone() {
130130
}
131131

132132
public interface Listener {
133-
void onComplete( Animation anim );
133+
void onComplete(Animation anim);
134134
}
135135
}

com/watabou/noosa/Resizable.java src/main/java/com/watabou/noosa/Resizable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
public interface Resizable {
2121

22-
public void size( float width, float height );
22+
public void size(float width, float height);
2323
public float width();
2424
public float height();
2525

File renamed without changes.
File renamed without changes.

com/watabou/noosa/TouchArea.java src/main/java/com/watabou/noosa/TouchArea.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
import com.watabou.input.Touchscreen.Touch;
2222
import com.watabou.utils.Signal;
2323

24-
public class TouchArea extends Visual implements Signal.Listener<Touchscreen.Touch> {
24+
public class TouchArea extends Visual implements Signal.Listener<Touch> {
2525

2626
// Its target can be toucharea itself
2727
public Visual target;
2828

29-
protected Touchscreen.Touch touch = null;
29+
protected Touch touch = null;
3030

3131
public TouchArea( Visual target ) {
3232
super( 0, 0, 0, 0 );
File renamed without changes.

com/watabou/noosa/tweeners/Tweener.java src/main/java/com/watabou/noosa/tweeners/Tweener.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ protected void onComplete() {
5959
abstract protected void updateValues( float progress );
6060

6161
public static interface Listener {
62-
void onComplete( Tweener tweener );
62+
void onComplete(Tweener tweener);
6363
}
6464
}

com/watabou/utils/BitmapCache.java src/main/java/com/watabou/utils/BitmapCache.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class BitmapCache {
2929

3030
private static final String DEFAULT = "__default";
3131

32-
private static HashMap<String,Layer> layers = new HashMap<String, BitmapCache.Layer>();
32+
private static HashMap<String,Layer> layers = new HashMap<String, Layer>();
3333

3434
private static BitmapFactory.Options opts = new BitmapFactory.Options();
3535
static {

com/watabou/utils/Bundlable.java src/main/java/com/watabou/utils/Bundlable.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
public interface Bundlable {
2121

22-
void restoreFromBundle( Bundle bundle );
23-
void storeInBundle( Bundle bundle );
22+
void restoreFromBundle(Bundle bundle);
23+
void storeInBundle(Bundle bundle);
2424

2525
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

com/watabou/utils/Graph.java src/main/java/com/watabou/utils/Graph.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ public static <T extends Node> List<T> buildPath( Collection<T> nodes, T from, T
9292
public interface Node {
9393

9494
int distance();
95-
void distance( int value );
95+
void distance(int value);
9696

9797
int price();
98-
void price( int value );
98+
void price(int value);
9999

100100
Collection<? extends Node> edges();
101101

File renamed without changes.

com/watabou/utils/PointF.java src/main/java/com/watabou/utils/PointF.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ public PointF set( float v ) {
8383
}
8484

8585
public PointF polar( float a, float l ) {
86-
this.x = l * FloatMath.cos( a );
87-
this.y = l * FloatMath.sin( a );
86+
this.x = l * (float)Math.cos( a );
87+
this.y = l * (float)Math.sin( a );
8888
return this;
8989
}
9090

@@ -118,7 +118,7 @@ public Point floor() {
118118
}
119119

120120
public float length() {
121-
return FloatMath.sqrt( x * x + y * y );
121+
return (float)Math.sqrt( x * x + y * y );
122122
}
123123

124124
public static PointF sum( PointF a, PointF b ) {
@@ -136,7 +136,7 @@ public static PointF inter( PointF a, PointF b, float d ) {
136136
public static float distance( PointF a, PointF b ) {
137137
float dx = a.x - b.x;
138138
float dy = a.y - b.y;
139-
return FloatMath.sqrt( dx * dx + dy * dy );
139+
return (float)Math.sqrt( dx * dx + dy * dy );
140140
}
141141

142142
public static float angle( PointF start, PointF end ) {
File renamed without changes.
File renamed without changes.

com/watabou/utils/Signal.java src/main/java/com/watabou/utils/Signal.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
public class Signal<T> {
2323

24-
private LinkedList<Listener<T>> listeners = new LinkedList<Signal.Listener<T>>();
24+
private LinkedList<Listener<T>> listeners = new LinkedList<Listener<T>>();
2525

2626
private boolean canceled;
2727

@@ -87,6 +87,6 @@ public void cancel() {
8787
}
8888

8989
public static interface Listener<T> {
90-
public void onSignal( T t );
90+
public void onSignal(T t);
9191
}
9292
}

src/main/res/values/strings.xml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<resources>
2+
<string name="app_name">PDclasses</string>
3+
</resources>

0 commit comments

Comments
 (0)