From c9ac054b1dcea141a33dedc6802b3bdcbd71c513 Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Tue, 21 Mar 2017 17:23:21 -0300 Subject: [PATCH 1/9] :lipstick: Remove comment from gradle config --- demo/build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/demo/build.gradle b/demo/build.gradle index 5353ac5..4d26b96 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -22,6 +22,5 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.0.0' - // compile 'com.github.boxme:squarecamera:1.0.3' compile project(':squarecamera') } From fc0f22c9fd97a2c07041b8d8afa5a42217e5db9a Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Tue, 21 Mar 2017 17:20:47 -0300 Subject: [PATCH 2/9] :lipstick: Use double quotation marks in gradle --- demo/build.gradle | 10 ++++----- squarecamera/build.gradle | 46 +++++++++++++++++++-------------------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/demo/build.gradle b/demo/build.gradle index 4d26b96..3f89867 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -1,4 +1,4 @@ -apply plugin: 'com.android.application' +apply plugin: "com.android.application" android { compileSdkVersion 23 @@ -14,13 +14,13 @@ android { buildTypes { release { minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:23.0.0' - compile project(':squarecamera') + compile fileTree(dir: "libs", include: ["*.jar"]) + compile "com.android.support:appcompat-v7:23.0.0" + compile project(":squarecamera") } diff --git a/squarecamera/build.gradle b/squarecamera/build.gradle index fd17e49..c536b26 100644 --- a/squarecamera/build.gradle +++ b/squarecamera/build.gradle @@ -1,12 +1,12 @@ -apply plugin: 'com.android.library' -apply plugin: 'com.github.dcendents.android-maven' -apply plugin: 'com.jfrog.bintray' +apply plugin: "com.android.library" +apply plugin: "com.github.dcendents.android-maven" +apply plugin: "com.jfrog.bintray" version = "1.1.0" group = "com.github.boxme" -def siteUrl = 'https://github.com/boxme/SquareCamera' -def gitUrl = 'https://github.com/boxme/SquareCamera.git' +def siteUrl = "https://github.com/boxme/SquareCamera" +def gitUrl = "https://github.com/boxme/SquareCamera.git" android { compileSdkVersion 23 @@ -22,24 +22,24 @@ android { buildTypes { release { minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } } packagingOptions { - exclude 'META-INF/NOTICE.txt' - exclude 'META-INF/LICENSE.txt' + exclude "META-INF/NOTICE.txt" + exclude "META-INF/LICENSE.txt" } } Properties properties = new Properties() -properties.load(project.rootProject.file('local.properties').newDataInputStream()) +properties.load(project.rootProject.file("local.properties").newDataInputStream()) bintray { user = properties.getProperty("bintray.user") key = properties.getProperty("bintray.apikey") - configurations = ['archives'] + configurations = ["archives"] pkg { repo = "maven" name = "SquareCamera" @@ -54,20 +54,20 @@ install { repositories.mavenInstaller { pom { project { - packaging 'aar' - name 'A camera that takes square photos' + packaging "aar" + name "A camera that takes square photos" url siteUrl licenses { license { - name 'The MIT License' - url 'https://github.com/boxme/SquareCamera/blob/master/LICENSE' + name "The MIT License" + url "https://github.com/boxme/SquareCamera/blob/master/LICENSE" } } developers { developer { - id 'boxme' - name 'Desmond Ng' - email 'desmond.ng.yang.yi@gmail.com' + id "boxme" + name "Desmond Ng" + email "desmond.ng.yang.yi@gmail.com" } } scm { @@ -90,15 +90,15 @@ repositories { } dependencies { - compile fileTree(dir: 'libs', include: ['*.jar']) - compile 'com.android.support:appcompat-v7:23.0.1' - compile 'com.android.support:support-v4:23.0.1' - compile 'com.android.support:design:23.0.1' + compile fileTree(dir: "libs", include: ["*.jar"]) + compile "com.android.support:appcompat-v7:23.0.1" + compile "com.android.support:support-v4:23.0.1" + compile "com.android.support:design:23.0.1" } task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs - classifier = 'sources' + classifier = "sources" } task javadoc(type: Javadoc) { @@ -107,7 +107,7 @@ task javadoc(type: Javadoc) { } task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' + classifier = "javadoc" from javadoc.destinationDir } From 979b082e4927bd15f39ce0aba212fdf3e6e30a7c Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Tue, 21 Mar 2017 17:07:56 -0300 Subject: [PATCH 3/9] :package: Define single package version --- build.gradle | 12 ++++++++++++ demo/build.gradle | 10 +++++----- squarecamera/build.gradle | 14 +++++++------- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/build.gradle b/build.gradle index a2b89c9..8ff85d9 100644 --- a/build.gradle +++ b/build.gradle @@ -18,3 +18,15 @@ allprojects { jcenter() } } + +// Define versions in a single place +ext { + // Sdk and tools + minSdkVersion = 14 + targetSdkVersion = 23 + compileSdkVersion = 23 + buildToolsVersion = '23.0.1' + + // App dependencies + supportLibraryVersion = '23.0.1' +} diff --git a/demo/build.gradle b/demo/build.gradle index 3f89867..3d4aceb 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -1,13 +1,13 @@ apply plugin: "com.android.application" android { - compileSdkVersion 23 - buildToolsVersion "23.0.0" + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { applicationId "com.desmond.demo" - minSdkVersion 14 - targetSdkVersion 23 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 2 versionName "1.1" } @@ -21,6 +21,6 @@ android { dependencies { compile fileTree(dir: "libs", include: ["*.jar"]) - compile "com.android.support:appcompat-v7:23.0.0" + compile "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion" compile project(":squarecamera") } diff --git a/squarecamera/build.gradle b/squarecamera/build.gradle index c536b26..a6496ed 100644 --- a/squarecamera/build.gradle +++ b/squarecamera/build.gradle @@ -9,13 +9,13 @@ def siteUrl = "https://github.com/boxme/SquareCamera" def gitUrl = "https://github.com/boxme/SquareCamera.git" android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion resourcePrefix "squarecamera__" defaultConfig { - minSdkVersion 14 - targetSdkVersion 23 + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion versionCode 5 versionName "1.1.0" } @@ -91,9 +91,9 @@ repositories { dependencies { compile fileTree(dir: "libs", include: ["*.jar"]) - compile "com.android.support:appcompat-v7:23.0.1" - compile "com.android.support:support-v4:23.0.1" - compile "com.android.support:design:23.0.1" + compile "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion" + compile "com.android.support:support-v4:$rootProject.supportLibraryVersion" + compile "com.android.support:design:$rootProject.supportLibraryVersion" } task sourcesJar(type: Jar) { From 1f3230c6c5318add711c59fb39f3c5fc29b4cead Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Tue, 21 Mar 2017 17:06:07 -0300 Subject: [PATCH 4/9] :wrench: Upgrade build dependencies - Android SDK 25 - Android Build Tools 25.0.2 - Android Support Library v25.3.0 - Android Maven Plugin v1.4.1 - Gradle Plugin v2.3.0 --- build.gradle | 12 ++++++------ gradle/wrapper/gradle-wrapper.properties | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 8ff85d9..de59a68 100644 --- a/build.gradle +++ b/build.gradle @@ -5,9 +5,9 @@ buildscript { jcenter() } dependencies { - classpath 'com.android.tools.build:gradle:1.3.0' + classpath 'com.android.tools.build:gradle:2.3.0' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2' - classpath 'com.github.dcendents:android-maven-plugin:1.2' + classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } @@ -23,10 +23,10 @@ allprojects { ext { // Sdk and tools minSdkVersion = 14 - targetSdkVersion = 23 - compileSdkVersion = 23 - buildToolsVersion = '23.0.1' + targetSdkVersion = 25 + compileSdkVersion = 25 + buildToolsVersion = '25.0.2' // App dependencies - supportLibraryVersion = '23.0.1' + supportLibraryVersion = '25.3.0' } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9ffdcb8..43d67a4 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Apr 29 23:06:06 SGT 2015 +#Tue Mar 21 16:53:40 BRT 2017 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip From 44e87e4971bd6809543707d20c4c3b9fffdd13a4 Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Sun, 26 Mar 2017 15:34:46 -0300 Subject: [PATCH 5/9] :bug: Remove unused dimension values --- squarecamera/src/main/res/values-w820dp/dimens.xml | 4 ---- squarecamera/src/main/res/values/dimens.xml | 4 ---- 2 files changed, 8 deletions(-) diff --git a/squarecamera/src/main/res/values-w820dp/dimens.xml b/squarecamera/src/main/res/values-w820dp/dimens.xml index 7ac02d6..55d53ac 100644 --- a/squarecamera/src/main/res/values-w820dp/dimens.xml +++ b/squarecamera/src/main/res/values-w820dp/dimens.xml @@ -3,8 +3,4 @@ (such as screen margins) for screens with more than 820dp of available width. This would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). --> 64dp - - 64dp diff --git a/squarecamera/src/main/res/values/dimens.xml b/squarecamera/src/main/res/values/dimens.xml index 2640dc6..1a8158b 100644 --- a/squarecamera/src/main/res/values/dimens.xml +++ b/squarecamera/src/main/res/values/dimens.xml @@ -4,8 +4,4 @@ 16dp 300dp 250dp - - 16dp - 16dp - 16dp From 7eff097dad430c8a2c02813186ca059617e8f0f9 Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Mon, 3 Apr 2017 13:13:20 -0300 Subject: [PATCH 6/9] :lipstick: Google XML code style --- demo/src/main/AndroidManifest.xml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/demo/src/main/AndroidManifest.xml b/demo/src/main/AndroidManifest.xml index 2100d77..def3533 100644 --- a/demo/src/main/AndroidManifest.xml +++ b/demo/src/main/AndroidManifest.xml @@ -1,25 +1,24 @@ - - - + package="com.desmond.demo"> - + + + + android:theme="@style/AppTheme" + tools:replace="android:theme"> + android:label="@string/app_name"> From 933fea7e863fd56903e72c14f6a9cf0b60e35936 Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Mon, 3 Apr 2017 13:17:45 -0300 Subject: [PATCH 7/9] :bug: App compatible with ZERO devices The typo on camera hardware feature declaration turned it incompatible with ALL devices connected to Google Play. Now the feature is also marked as required because it does not obtain images from file manager, but only from the device camera. References: - Stack Overflow - Android app compatible with 0 devices. See http://stackoverflow.com/questions/16822676 --- demo/src/main/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demo/src/main/AndroidManifest.xml b/demo/src/main/AndroidManifest.xml index def3533..f8c8d48 100644 --- a/demo/src/main/AndroidManifest.xml +++ b/demo/src/main/AndroidManifest.xml @@ -3,7 +3,7 @@ xmlns:tools="http://schemas.android.com/tools" package="com.desmond.demo"> - + From bea24f61e0d636629ae18e2a03c19127556687fd Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Tue, 21 Mar 2017 17:31:18 -0300 Subject: [PATCH 8/9] :bookmark: Square Camera library release v1.1.1 --- squarecamera/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/squarecamera/build.gradle b/squarecamera/build.gradle index a6496ed..958aa7b 100644 --- a/squarecamera/build.gradle +++ b/squarecamera/build.gradle @@ -16,8 +16,8 @@ android { defaultConfig { minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 5 - versionName "1.1.0" + versionCode 6 + versionName "1.1.1" } buildTypes { release { From e3cf86308dfd810d8425b88d76423c1193458434 Mon Sep 17 00:00:00 2001 From: JP Ventura Date: Tue, 21 Mar 2017 17:32:07 -0300 Subject: [PATCH 9/9] :bookmark: Demonstration app release v1.2 --- demo/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/demo/build.gradle b/demo/build.gradle index 3d4aceb..1ba7cac 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -8,8 +8,8 @@ android { applicationId "com.desmond.demo" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 2 - versionName "1.1" + versionCode 3 + versionName "1.2" } buildTypes { release {