Skip to content

Commit

Permalink
Merge branch 'release/1.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariovc committed Feb 13, 2018
2 parents 8d226af + 63c8e2c commit 88ca5de
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 20 deletions.
18 changes: 13 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,27 @@ ext {
configuration = [
app_name : "ImagePicker",
packageName : "com.mvc.imagepicker",
compileVersion : 25,
buildToolsVersion : "25.0.3",
compileVersion : 27,
buildToolsVersion : "27.0.3",
minSdk : 14,
targetSdk : 24
targetSdk : 27
]

libraries = [
supportVersion : "24.2.0"
supportVersion : "27.0.2"
]
}

buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.android.tools.build:gradle:3.0.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -46,6 +50,10 @@ buildscript {
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}

task checkstyle(type: Checkstyle) {
Expand Down
6 changes: 3 additions & 3 deletions config/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
limitations under the License.
-->
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">

<module name="Checker">
<!--module name="NewlineAtEndOfFile"/-->
Expand Down Expand Up @@ -129,7 +129,7 @@
<!--<module name="InnerAssignment"/>-->
<!--module name="MagicNumber"/-->
<module name="MissingSwitchDefault"/>
<module name="RedundantThrows"/>
<!--<module name="RedundantThrows"/>-->
<module name="SimplifyBooleanExpression"/>
<module name="SimplifyBooleanReturn"/>

Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Fri Jun 30 14:03:37 MSK 2017
#Tue Feb 13 13:38:16 CET 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
6 changes: 4 additions & 2 deletions library/src/main/java/com/mvc/imagepicker/ImagePicker.java
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@ public static Bitmap getImageFromResult(Context context, int requestCode, int re
|| imageReturnedIntent.getData().toString().contains(imageFile.toString()));
if (isCamera) { /** CAMERA **/
//selectedImage = Uri.fromFile(imageFile);
selectedImage = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID + ".provider", imageFile);
selectedImage = FileProvider.getUriForFile(context,
BuildConfig.APPLICATION_ID + ".provider", imageFile);


} else { /** ALBUM **/
Expand Down Expand Up @@ -401,7 +402,8 @@ public static InputStream getInputStreamFromResult(Context context, int requestC
|| imageReturnedIntent.getData().toString().contains(imageFile.toString()));
if (isCamera) { /** CAMERA **/
//selectedImage = Uri.fromFile(imageFile);
selectedImage = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID + ".provider", imageFile);
selectedImage = FileProvider.getUriForFile(context,
BuildConfig.APPLICATION_ID + ".provider", imageFile);
} else { /** ALBUM **/
selectedImage = imageReturnedIntent.getData();
}
Expand Down
4 changes: 4 additions & 0 deletions library/src/main/res/xml/provider_paths.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<paths>
<external-path path="." name="external_files" />
</paths>
10 changes: 2 additions & 8 deletions sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,20 +49,14 @@ android {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationVariants.all { variant ->
variant.outputs.each { output ->
variant.outputs.all { output ->
def date = new Date().format("yyyy-MM-dd___(HH.mm.ss)")
def newName = output.outputFile.name
newName = newName.replace(project.getName(), config.app_name)
newName = newName.replace("release", String.format("v%d(%s)___%s",
outputFileName = outputFileName.replace("release", String.format("v%d(%s)___%s",
defaultConfig.versionCode, defaultConfig.versionName, date))

def outputFile = String.format("apk/%s", newName)
output.outputFile = new File(output.outputFile.parent, outputFile)
}
}
}
}
buildToolsVersion '25.0.0'
}

dependencies {
Expand Down

0 comments on commit 88ca5de

Please sign in to comment.