Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade build dependencies #63

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
16 changes: 14 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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'
}
23 changes: 11 additions & 12 deletions demo/build.gradle
Original file line number Diff line number Diff line change
@@ -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")
}
15 changes: 7 additions & 8 deletions demo/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.desmond.demo" >
package="com.desmond.demo">

<uses-feature android:name="android.hardware.camera" android:required="true" />

<!-- Request permission to use a device camera -->
<uses-permission android:name="android.permission.CAMERA" />

<uses-feature android:name="android.hardware.camera2" />

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

<application
tools:replace="android:theme"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
android:theme="@style/AppTheme"
tools:replace="android:theme">
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
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 @@
#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
58 changes: 29 additions & 29 deletions squarecamera/build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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 '[email protected]'
id "boxme"
name "Desmond Ng"
email "[email protected]"
}
}
scm {
Expand All @@ -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) {
Expand All @@ -107,7 +107,7 @@ task javadoc(type: Javadoc) {
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
classifier = "javadoc"
from javadoc.destinationDir
}

Expand Down
4 changes: 0 additions & 4 deletions squarecamera/src/main/res/values-w820dp/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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). -->
<dimen name="squarecamera__activity_horizontal_margin">64dp</dimen>
<!-- Example customization of dimensions originally defined in res/values/dimens.xml
(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). -->
<dimen name="activity_horizontal_margin">64dp</dimen>
</resources>
4 changes: 0 additions & 4 deletions squarecamera/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@
<dimen name="squarecamera__activity_vertical_margin">16dp</dimen>
<dimen name="squarecamera__cover_start_height">300dp</dimen>
<dimen name="squarecamera__cover_start_width">250dp</dimen>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="fab_margin">16dp</dimen>
</resources>