Skip to content
This repository has been archived by the owner on Jul 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #297 from manijshrestha/master
Browse files Browse the repository at this point in the history
Gradle cleanup
  • Loading branch information
dm77 authored Apr 19, 2017
2 parents 976012d + c3e30f9 commit 8b6730a
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 18 deletions.
11 changes: 6 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
apply from: 'dependencies.gradle'

buildscript {
repositories {
mavenCentral()
Expand All @@ -21,7 +23,6 @@ allprojects {
}

ext {
supportLibraryDependency = 'com.android.support:support-v4:25.3.1'
isLibrary = false
}
}
Expand All @@ -31,8 +32,8 @@ subprojects {
ext.pluginContainer = project.getPlugins()
if(ext.pluginContainer.hasPlugin("com.android.application") || ext.pluginContainer.hasPlugin("com.android.library")) {
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
compileSdkVersion versions.compile_sdk
buildToolsVersion versions.build_tools

android {
lintOptions {
Expand All @@ -41,8 +42,8 @@ subprojects {
}

defaultConfig {
minSdkVersion 9
targetSdkVersion 25
minSdkVersion versions.min_sdk
targetSdkVersion versions.target_sdk
versionCode 191
versionName "1.9.1"
}
Expand Down
2 changes: 1 addition & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ ext {
}

dependencies {
compile supportLibraryDependency
compile libraries.support_v4
}
19 changes: 19 additions & 0 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
ext.versions = [
compile_sdk : 25,
min_sdk : 9,
target_sdk : 25,
build_tools : "25.0.2",
support_lib : "25.3.1",
zxing : "3.3.0",
barcodescanner: "1.9.1"
]

ext.libraries = [
support_v4 : "com.android.support:support-v4:$versions.support_lib",
appcompat_v7 : "com.android.support:appcompat-v7:$versions.support_lib",
design_support : "com.android.support:design:$versions.support_lib",
zxing_core : "com.google.zxing:core:$versions.zxing",
barcodescanner_core : "me.dm7.barcodescanner:core:$versions.barcodescanner",
barcodescanner_zbar : "me.dm7.barcodescanner:zbar:$versions.barcodescanner",
barcodescanner_zxing: "me.dm7.barcodescanner:zxing:$versions.barcodescanner"
]
9 changes: 4 additions & 5 deletions zbar-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ apply plugin: 'com.android.application'

dependencies {
//compile project(":zbar")
compile 'me.dm7.barcodescanner:zbar:1.9.1'
compile supportLibraryDependency
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile libraries.barcodescanner_zbar
compile libraries.support_v4
compile libraries.appcompat_v7
compile libraries.design_support
}

android {
defaultConfig {
applicationId "${project.group}.zbar.sample"
}
buildToolsVersion '25.0.2'
}
2 changes: 1 addition & 1 deletion zbar/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ ext {

dependencies {
//compile project(":core")
compile 'me.dm7.barcodescanner:core:1.9.1'
compile libraries.barcodescanner_core
compile fileTree(dir: 'libs', include: '*.jar')
}
8 changes: 4 additions & 4 deletions zxing-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ apply plugin: 'com.android.application'

dependencies {
// compile project(":zxing")
compile 'me.dm7.barcodescanner:zxing:1.9.1'
compile supportLibraryDependency
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile libraries.barcodescanner_zxing
compile libraries.support_v4
compile libraries.appcompat_v7
compile libraries.design_support
}

android {
Expand Down
4 changes: 2 additions & 2 deletions zxing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ ext {

dependencies {
//compile project(":core")
compile 'me.dm7.barcodescanner:core:1.9.1'
compile 'com.google.zxing:core:3.3.0'
compile libraries.barcodescanner_core
compile libraries.zxing_core
}

0 comments on commit 8b6730a

Please sign in to comment.