From 35f33a0d5c3f1145ac46f060594db1f68585499d Mon Sep 17 00:00:00 2001 From: Arthur Teplitzki Date: Thu, 12 Feb 2015 18:28:37 +0200 Subject: [PATCH] * fix javadoc issues * add generateRelease support --- cropper/build.gradle | 11 ++++++++++- .../theartofdev/edmodo/cropper/CropImageView.java | 12 ++++++------ .../edmodo/cropper/cropwindow/edge/Edge.java | 4 ++-- .../edmodo/cropper/util/ImageViewUtil.java | 12 ++++++------ sample/build.gradle | 3 +++ 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/cropper/build.gradle b/cropper/build.gradle index 2ce64185..18672f08 100644 --- a/cropper/build.gradle +++ b/cropper/build.gradle @@ -1,5 +1,12 @@ apply plugin: 'com.android.library' +ext { + PUBLISH_GROUP_ID = 'com.theartofdev.edmodo' + PUBLISH_ARTIFACT_ID = 'Android-Image-Cropper' + PUBLISH_VERSION = '1.0' + // gradlew clean build generateRelease +} + android { compileSdkVersion 21 @@ -14,4 +21,6 @@ android { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } -} \ No newline at end of file +} + +apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle' \ No newline at end of file diff --git a/cropper/src/main/java/com/theartofdev/edmodo/cropper/CropImageView.java b/cropper/src/main/java/com/theartofdev/edmodo/cropper/CropImageView.java index fb8e17cc..8e4b4fea 100644 --- a/cropper/src/main/java/com/theartofdev/edmodo/cropper/CropImageView.java +++ b/cropper/src/main/java/com/theartofdev/edmodo/cropper/CropImageView.java @@ -228,8 +228,8 @@ public void setImageBitmap(Bitmap bitmap) { } /** - * Sets a Bitmap and initializes the image rotation according to the EXIT data. - *

+ * Sets a Bitmap and initializes the image rotation according to the EXIT data.
+ *
* The EXIF can be retrieved by doing the following: * ExifInterface exif = new ExifInterface(path); * @@ -263,9 +263,9 @@ public void setImageResource(int resId) { } /** - * Sets a bitmap loaded from the given Android URI as the content of the CropImageView.
- * Can be used with URI from gallery or camera source.
- * Will rotate the image by exif data.
+ * Sets a bitmap loaded from the given Android URI as the content of the CropImageView.
+ * Can be used with URI from gallery or camera source.
+ * Will rotate the image by exif data.
* * @param uri the URI to load the image from */ @@ -380,7 +380,7 @@ public Bitmap getCroppedImage() { } /** - * Gets the cropped image based on the current crop window.
+ * Gets the cropped image based on the current crop window.
* If image loaded from URI will use sample size to fir the requested width and height. * * @return a new Bitmap representing the cropped image diff --git a/cropper/src/main/java/com/theartofdev/edmodo/cropper/cropwindow/edge/Edge.java b/cropper/src/main/java/com/theartofdev/edmodo/cropper/cropwindow/edge/Edge.java index d89edb24..4d61b80e 100644 --- a/cropper/src/main/java/com/theartofdev/edmodo/cropper/cropwindow/edge/Edge.java +++ b/cropper/src/main/java/com/theartofdev/edmodo/cropper/cropwindow/edge/Edge.java @@ -133,9 +133,9 @@ public void adjustCoordinate(float aspectRatio) { * Returns whether or not you can re-scale the image based on whether any edge would be out of bounds. * Checks all the edges for a possibility of jumping out of bounds. * - * @param Edge the Edge that is about to be expanded + * @param edge the Edge that is about to be expanded * @param imageRect the rectangle of the picture - * @param aspectratio the desired aspectRatio of the picture. + * @param aspectRatio the desired aspectRatio of the picture. * @return whether or not the new image would be out of bounds. */ public boolean isNewRectangleOutOfBounds(Edge edge, Rect imageRect, float aspectRatio) { diff --git a/cropper/src/main/java/com/theartofdev/edmodo/cropper/util/ImageViewUtil.java b/cropper/src/main/java/com/theartofdev/edmodo/cropper/util/ImageViewUtil.java index 64091190..ddc13fe3 100644 --- a/cropper/src/main/java/com/theartofdev/edmodo/cropper/util/ImageViewUtil.java +++ b/cropper/src/main/java/com/theartofdev/edmodo/cropper/util/ImageViewUtil.java @@ -85,8 +85,8 @@ public static Rect getBitmapRect(int bitmapWidth, } /** - * Rotate the given image by reading the Exif value of the image (uri).
- * If no rotation is required the image will not be rotated.
+ * Rotate the given image by reading the Exif value of the image (uri).
+ * If no rotation is required the image will not be rotated.
* New bitmap is created and the old one is recycled. */ public static RotateBitmapResult rotateBitmapByExif(Context context, Bitmap bitmap, Uri uri) { @@ -102,8 +102,8 @@ public static RotateBitmapResult rotateBitmapByExif(Context context, Bitmap bitm } /** - * Rotate the given image by given Exif value.
- * If no rotation is required the image will not be rotated.
+ * Rotate the given image by given Exif value.
+ * If no rotation is required the image will not be rotated.
* New bitmap is created and the old one is recycled. */ public static RotateBitmapResult rotateBitmapByExif(Bitmap bitmap, ExifInterface exif) { @@ -200,7 +200,7 @@ public static int calculateInSampleSize(int width, int height, int reqWidth, int } /** - * Get {@link java.io.File} object for the given Android URI.
+ * Get {@link java.io.File} object for the given Android URI.
* Use content resolver to get real path if direct path doesn't return valid file. */ public static File getFileFromUri(Context context, Uri uri) { @@ -229,7 +229,7 @@ public static File getFileFromUri(Context context, Uri uri) { } /** - * Rotate the given bitmap by the given degrees.
+ * Rotate the given bitmap by the given degrees.
* New bitmap is created and the old one is recycled. */ public static Bitmap rotateBitmap(Bitmap bitmap, int degrees) { diff --git a/sample/build.gradle b/sample/build.gradle index 050aeca0..0dacf3ba 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -10,6 +10,9 @@ android { versionCode 1 versionName '1.0' } + lintOptions { + abortOnError false + } } dependencies {