diff --git a/build.gradle b/build.gradle index a2b89c9..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 } @@ -18,3 +18,15 @@ allprojects { jcenter() } } + +// Define versions in a single place +ext { + // Sdk and tools + minSdkVersion = 14 + targetSdkVersion = 25 + compileSdkVersion = 25 + buildToolsVersion = '25.0.2' + + // App dependencies + supportLibraryVersion = '25.3.0' +} diff --git a/demo/build.gradle b/demo/build.gradle index 5353ac5..1ba7cac 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -1,27 +1,26 @@ -apply plugin: 'com.android.application' +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 - versionCode 2 - versionName "1.1" + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion + versionCode 3 + versionName "1.2" } 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 'com.github.boxme:squarecamera:1.0.3' - compile project(':squarecamera') + compile fileTree(dir: "libs", include: ["*.jar"]) + compile "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion" + compile project(":squarecamera") } diff --git a/demo/src/main/AndroidManifest.xml b/demo/src/main/AndroidManifest.xml index 2100d77..f8c8d48 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"> 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 diff --git a/squarecamera/build.gradle b/squarecamera/build.gradle index fd17e49..958aa7b 100644 --- a/squarecamera/build.gradle +++ b/squarecamera/build.gradle @@ -1,45 +1,45 @@ -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 - buildToolsVersion "23.0.1" + compileSdkVersion rootProject.ext.compileSdkVersion + buildToolsVersion rootProject.ext.buildToolsVersion resourcePrefix "squarecamera__" defaultConfig { - minSdkVersion 14 - targetSdkVersion 23 - versionCode 5 - versionName "1.1.0" + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion + versionCode 6 + versionName "1.1.1" } 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:$rootProject.supportLibraryVersion" + compile "com.android.support:support-v4:$rootProject.supportLibraryVersion" + compile "com.android.support:design:$rootProject.supportLibraryVersion" } 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 } 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