forked from tschaumburg/FastBarcodeScanner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f4da02
commit 4896931
Showing
9 changed files
with
132 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
// Top-level build file where you can add configuration options common to all sub-projects/modules. | ||
ext { | ||
VERSION_NAME = '1.0.5' | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:1.5.0' | ||
classpath 'com.novoda:bintray-release:0.3.4' | ||
|
||
// NOTE: Do not place your application dependencies here; they belong | ||
// in the individual module build.gradle files | ||
|
@@ -21,3 +25,100 @@ allprojects { | |
task clean(type: Delete) { | ||
delete rootProject.buildDir | ||
} | ||
|
||
subprojects { | ||
buildscript { | ||
repositories { | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:1.5.0' | ||
classpath 'com.novoda:bintray-release:0.3.4' | ||
|
||
// NOTE: Do not place your application dependencies here; they belong | ||
// in the individual module build.gradle files | ||
} | ||
} | ||
ext { | ||
//VERSION_NAME = 'maventest' | ||
|
||
MODULE_NAME = project.name | ||
ARTIFACT_ID = project.name | ||
DESCRIPTION = ' ' | ||
SITE_URL = 'https://github.com/tschaumburg/FastBarcodeScanner' | ||
GIT_URL = 'https://github.com/tschaumburg/FastBarcodeScanner.git' | ||
|
||
GROUP_NAME = 'dk.schaumburgit.fast-barcode-scanner' | ||
LICENSE = 'The Apache Software License, Version 2.0' | ||
DEVELOPER_ID = 'tschaumburg' | ||
DEVELOPER_NAME = 'Thomas Schaumburg' | ||
DEVELOPER_EMAIL = '[email protected]' | ||
|
||
IS_UPLOADING = project.getGradle().startParameter.taskNames.any{it.contains('bintrayUpload')} | ||
} | ||
|
||
if (project.name in ['fast-barcode-scanner-demo']) { | ||
apply plugin: 'com.android.application' | ||
} else { | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'com.novoda.bintray-release' // must be applied after your artifact generating plugin (eg. java / com.android.library) | ||
|
||
publish { | ||
userOrg = 'tschaumburg' | ||
groupId = GROUP_NAME | ||
artifactId = ARTIFACT_ID | ||
uploadName = 'fast-barcode-scanner' | ||
publishVersion = VERSION_NAME | ||
desc = DESCRIPTION | ||
website = SITE_URL | ||
} | ||
} | ||
|
||
if (IS_UPLOADING && !(project.name in ['fast-barcode-scanner-demo'])) { | ||
println project.name | ||
apply plugin: 'maven' | ||
|
||
gradle.taskGraph.whenReady { taskGraph -> | ||
taskGraph.getAllTasks().find { | ||
it.path == ":$project.name:generatePomFileForMavenPublication" | ||
}.doLast { | ||
file("build/publications/maven/pom-default.xml").delete() | ||
println 'Overriding pom-file to make sure we can sync to maven central!' | ||
pom { | ||
//noinspection GroovyAssignabilityCheck | ||
project { | ||
name "$project.name" | ||
groupId GROUP_NAME | ||
artifactId ARTIFACT_ID | ||
packaging project.name == 'compiler' ? 'jar' : 'aar' | ||
description DESCRIPTION | ||
url SITE_URL | ||
version VERSION_NAME | ||
|
||
scm { | ||
url GIT_URL | ||
connection GIT_URL | ||
developerConnection GIT_URL | ||
} | ||
|
||
licenses { | ||
license { | ||
name LICENSE | ||
} | ||
} | ||
|
||
developers { | ||
developer { | ||
id DEVELOPER_ID | ||
name DEVELOPER_NAME | ||
email DEVELOPER_EMAIL | ||
} | ||
} | ||
} | ||
}.writeTo("build/publications/maven/pom-default.xml") | ||
} | ||
} | ||
} | ||
|
||
} | ||
//} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
include ':still-sequence-camera', ':tracking-barcode-scanner', ':fast-barcode-scanner', ':fast-barcode-scanner-demo' | ||
include ':tracking-barcode-scanner', ':still-sequence-camera', ':fast-barcode-scanner', ':fast-barcode-scanner-demo' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters