Skip to content

Commit 13f9ded

Browse files
updated gradle
1 parent 413a5fd commit 13f9ded

9 files changed

Lines changed: 83 additions & 65 deletions

File tree

AndroidBootstrap/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<uses-sdk
88
android:minSdkVersion="7"
9-
android:targetSdkVersion="17" />
9+
android:targetSdkVersion="19" />
1010

1111
<application/>
1212

AndroidBootstrap/build.gradle

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
11
apply plugin: 'android-library'
22

3+
dependencies {
4+
compile fileTree(dir: 'libs', include: '*.jar')
5+
}
6+
37
android {
4-
compileSdkVersion 19
5-
buildToolsVersion "19.0.0"
6-
defaultConfig {
7-
minSdkVersion 7
8-
targetSdkVersion 17
9-
}
8+
compileSdkVersion 18
9+
buildToolsVersion "20.0.0"
10+
1011
sourceSets {
1112
main {
1213
manifest.srcFile 'AndroidManifest.xml'
1314
java.srcDirs = ['src']
15+
resources.srcDirs = ['src']
16+
aidl.srcDirs = ['src']
17+
renderscript.srcDirs = ['src']
1418
res.srcDirs = ['res']
19+
assets.srcDirs = ['assets']
1520
}
21+
22+
// Move the tests to tests/java, tests/res, etc...
23+
instrumentTest.setRoot('tests')
24+
25+
// Move the build types to build-types/<type>
26+
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
27+
// This moves them out of them default location under src/<type>/... which would
28+
// conflict with src/ being used by the main source set.
29+
// Adding new build types or product flavors should be accompanied
30+
// by a similar customization.
31+
debug.setRoot('build-types/debug')
32+
release.setRoot('build-types/release')
1633
}
1734
}
Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,37 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:id="@+id/layout"
34
android:layout_width="wrap_content"
45
android:layout_height="wrap_content"
5-
android:id="@+id/layout"
66
android:duplicateParentState="true"
7-
android:paddingTop="10dp"
7+
android:orientation="horizontal"
88
android:paddingBottom="10dp"
9-
android:orientation="horizontal">
10-
9+
android:paddingTop="10dp" >
10+
11+
<TextView
12+
android:id="@+id/lblLeft"
13+
android:layout_width="wrap_content"
14+
android:layout_height="wrap_content"
15+
android:layout_gravity="center_vertical"
16+
android:paddingLeft="15dp"
17+
android:visibility="gone" />
18+
1119
<TextView
12-
android:id="@+id/lblLeft"
13-
android:layout_height="wrap_content"
14-
android:layout_width="wrap_content"
15-
android:paddingLeft="15dp"
16-
android:visibility="gone"
17-
android:layout_gravity="center_vertical"
18-
/>
20+
android:id="@+id/lblMiddle"
21+
android:layout_width="fill_parent"
22+
android:layout_height="wrap_content"
23+
android:layout_gravity="center"
24+
android:gravity="center_horizontal"
25+
android:paddingLeft="15dp"
26+
android:paddingRight="15dp"
27+
android:visibility="gone" />
1928

2029
<TextView
21-
android:id="@+id/lblMiddle"
22-
android:layout_height="wrap_content"
23-
android:layout_width="fill_parent"
24-
android:paddingLeft="15dp"
25-
android:paddingRight="15dp"
26-
android:layout_gravity="center"
27-
android:gravity="center_horizontal"
28-
android:visibility="gone"
29-
/>
30-
31-
<TextView
32-
android:id="@+id/lblRight"
33-
android:layout_height="wrap_content"
34-
android:layout_width="wrap_content"
35-
android:paddingRight="15dp"
36-
android:visibility="gone"
37-
android:layout_gravity="center_vertical"
38-
/>
30+
android:id="@+id/lblRight"
31+
android:layout_width="wrap_content"
32+
android:layout_height="wrap_content"
33+
android:layout_gravity="center_vertical"
34+
android:paddingRight="15dp"
35+
android:visibility="gone" />
3936

40-
</LinearLayout>
37+
</LinearLayout>

AndroidBootstrap/src/com/beardedhen/androidbootstrap/utils/ImageUtils.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,13 @@ public static Bitmap getCircleBitmap(Bitmap bitmap, int width, int height)
2828
final Paint paint = new Paint();
2929

3030
final Rect rect = new Rect(0, 0, width, height);
31-
final RectF rectF = new RectF(rect);
3231

3332
paint.setAntiAlias(true);
3433
canvas.drawARGB(0, 0, 0, 0);
3534
paint.setColor(color);
3635

37-
int radius = 0;
38-
if(width > height)
39-
{
40-
radius = height / 2;
41-
}
42-
else
43-
{
44-
radius = width / 2;
45-
}
36+
int radius = (width > height) ? height : width;
37+
radius /= 2;
4638

4739
canvas.drawCircle(width / 2, height / 2, radius, paint);
4840
paint.setXfermode(new PorterDuffXfermode(Mode.SRC_IN));

AndroidBootstrapTest/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<uses-sdk
88
android:minSdkVersion="8"
9-
android:targetSdkVersion="17" />
9+
android:targetSdkVersion="19" />
1010

1111
<application
1212
android:allowBackup="true"

AndroidBootstrapTest/build.gradle

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,36 @@
11
apply plugin: 'android'
22

3+
dependencies {
4+
compile fileTree(dir: 'libs', include: '*.jar')
5+
compile project(':AndroidBootstrap')
6+
compile project(':AndroidBootstrap')
7+
}
8+
39
android {
4-
compileSdkVersion 19
5-
buildToolsVersion "19.0.0"
6-
defaultConfig {
7-
minSdkVersion 8
8-
targetSdkVersion 17
9-
}
10+
compileSdkVersion 18
11+
buildToolsVersion "20.0.0"
12+
1013
sourceSets {
1114
main {
1215
manifest.srcFile 'AndroidManifest.xml'
1316
java.srcDirs = ['src']
17+
resources.srcDirs = ['src']
18+
aidl.srcDirs = ['src']
19+
renderscript.srcDirs = ['src']
1420
res.srcDirs = ['res']
1521
assets.srcDirs = ['assets']
1622
}
17-
}
18-
}
1923

20-
dependencies {
21-
compile project(":AndroidBootstrap")
24+
// Move the tests to tests/java, tests/res, etc...
25+
instrumentTest.setRoot('tests')
26+
27+
// Move the build types to build-types/<type>
28+
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
29+
// This moves them out of them default location under src/<type>/... which would
30+
// conflict with src/ being used by the main source set.
31+
// Adding new build types or product flavors should be accompanied
32+
// by a similar customization.
33+
debug.setRoot('build-types/debug')
34+
release.setRoot('build-types/release')
35+
}
2236
}

build.gradle

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
2-
32
buildscript {
43
repositories {
54
mavenCentral()
65
}
7-
86
dependencies {
9-
classpath 'com.android.tools.build:gradle:0.7.+'
7+
classpath 'com.android.tools.build:gradle:0.12.+'
108
}
11-
}
9+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Tue Oct 01 16:05:50 BST 2013
1+
#Wed Apr 10 15:27:10 PDT 2013
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-all.zip
6+
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1+
include ':AndroidBootstrapTest'
12
include ':AndroidBootstrap'
2-
include ':AndroidBootstrapTest'

0 commit comments

Comments
 (0)