Skip to content

Commit

Permalink
Project splitted in library and sample
Browse files Browse the repository at this point in the history
  • Loading branch information
ignasi committed Mar 28, 2014
1 parent 2d3d45a commit 41db90f
Show file tree
Hide file tree
Showing 26 changed files with 59 additions and 11 deletions.
File renamed without changes.
24 changes: 24 additions & 0 deletions FaceCropper-library/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apply plugin: 'android-library'

android {
compileSdkVersion 19
buildToolsVersion "19.0.3"

defaultConfig {
minSdkVersion 8
targetSdkVersion 16
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}

dependencies {
compile 'com.android.support:appcompat-v7:19.+'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
File renamed without changes.
9 changes: 9 additions & 0 deletions FaceCropper-library/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cat.lafosca.facecropper" >

<application
android:label="FaceCropper" >
</application>

</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package cat.lafosca.facecropper.util;
package cat.lafosca.facecropper;

import android.graphics.Bitmap;
import android.graphics.Canvas;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package cat.lafosca.facecropper.util;
package cat.lafosca.facecropper;

import android.content.Context;
import android.graphics.Bitmap;
Expand All @@ -23,8 +23,6 @@
import android.media.FaceDetector;
import android.util.Log;

import cat.lafosca.facecropper.BuildConfig;

/**
* An utility that crops faces from bitmaps.
* It support multiple faces (max 8 by default) and crop them all, fitted in the same image.
Expand Down
1 change: 1 addition & 0 deletions FaceCropper-sample/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
1 change: 1 addition & 0 deletions app/build.gradle → FaceCropper-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ dependencies {
compile 'com.android.support:appcompat-v7:+'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.squareup.picasso:picasso:2.2.0'
compile project(':FaceCropper-library')
}
17 changes: 17 additions & 0 deletions FaceCropper-sample/proguard-rules.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Develop/android-sdk/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 *;
#}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cat.lafosca.facecropper" >
package="cat.lafosca.facecropper.sample" >

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

Expand All @@ -10,7 +10,7 @@
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".ui.MainActivity"
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cat.lafosca.facecropper.ui;
package cat.lafosca.facecropper.sample;

import android.graphics.Bitmap;
import android.support.v4.view.PagerAdapter;
Expand All @@ -14,9 +14,7 @@
import com.squareup.picasso.Picasso;
import com.squareup.picasso.Transformation;

import cat.lafosca.facecropper.R;
import cat.lafosca.facecropper.util.FaceCropper;

import cat.lafosca.facecropper.FaceCropper;

public class MainActivity extends ActionBarActivity {

Expand Down
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.
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':app'
include 'FaceCropper-library', 'FaceCropper-sample'

0 comments on commit 41db90f

Please sign in to comment.