Skip to content

Commit 41db90f

Browse files
committed
Project splitted in library and sample
1 parent 2d3d45a commit 41db90f

26 files changed

Lines changed: 59 additions & 11 deletions

File tree

FaceCropper-library/build.gradle

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
apply plugin: 'android-library'
2+
3+
android {
4+
compileSdkVersion 19
5+
buildToolsVersion "19.0.3"
6+
7+
defaultConfig {
8+
minSdkVersion 8
9+
targetSdkVersion 16
10+
versionCode 1
11+
versionName "1.0"
12+
}
13+
buildTypes {
14+
release {
15+
runProguard false
16+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
17+
}
18+
}
19+
}
20+
21+
dependencies {
22+
compile 'com.android.support:appcompat-v7:19.+'
23+
compile fileTree(dir: 'libs', include: ['*.jar'])
24+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="cat.lafosca.facecropper" >
4+
5+
<application
6+
android:label="FaceCropper" >
7+
</application>
8+
9+
</manifest>

app/src/main/java/cat/lafosca/facecropper/util/BitmapUtils.java renamed to FaceCropper-library/src/main/java/cat/lafosca/facecropper/BitmapUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package cat.lafosca.facecropper.util;
17+
package cat.lafosca.facecropper;
1818

1919
import android.graphics.Bitmap;
2020
import android.graphics.Canvas;

app/src/main/java/cat/lafosca/facecropper/util/FaceCropper.java renamed to FaceCropper-library/src/main/java/cat/lafosca/facecropper/FaceCropper.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package cat.lafosca.facecropper.util;
17+
package cat.lafosca.facecropper;
1818

1919
import android.content.Context;
2020
import android.graphics.Bitmap;
@@ -23,8 +23,6 @@
2323
import android.media.FaceDetector;
2424
import android.util.Log;
2525

26-
import cat.lafosca.facecropper.BuildConfig;
27-
2826
/**
2927
* An utility that crops faces from bitmaps.
3028
* It support multiple faces (max 8 by default) and crop them all, fitted in the same image.

FaceCropper-sample/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ dependencies {
2222
compile 'com.android.support:appcompat-v7:+'
2323
compile fileTree(dir: 'libs', include: ['*.jar'])
2424
compile 'com.squareup.picasso:picasso:2.2.0'
25+
compile project(':FaceCropper-library')
2526
}
Lines changed: 17 additions & 0 deletions
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 /Develop/android-sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the ProGuard
5+
# include property in project.properties.
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+
#}

app/src/main/AndroidManifest.xml renamed to FaceCropper-sample/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="cat.lafosca.facecropper" >
3+
package="cat.lafosca.facecropper.sample" >
44

55
<uses-permission android:name="android.permission.INTERNET" />
66

@@ -10,7 +10,7 @@
1010
android:label="@string/app_name"
1111
android:theme="@style/AppTheme" >
1212
<activity
13-
android:name=".ui.MainActivity"
13+
android:name=".MainActivity"
1414
android:label="@string/app_name" >
1515
<intent-filter>
1616
<action android:name="android.intent.action.MAIN" />

0 commit comments

Comments
 (0)