Skip to content

Commit

Permalink
1.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaumburg committed Dec 23, 2015
1 parent 0f4da02 commit 4896931
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 47 deletions.
101 changes: 101 additions & 0 deletions build.gradle
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
Expand All @@ -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")
}
}
}

}
//}
8 changes: 2 additions & 6 deletions fast-barcode-scanner-demo/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
apply plugin: 'com.android.application'

ext {
PUBLISH_GROUP_ID = 'dk.schaumburgit.fast-barcode-scanner'
PUBLISH_ARTIFACT_ID = 'fast-barcode-scanner-demo'
PUBLISH_VERSION = '1.0.4'
DESCRIPTION = 'A'
}

android {
Expand Down Expand Up @@ -36,4 +32,4 @@ dependencies {
compile project(':fast-barcode-scanner')
}

apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
//apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
8 changes: 2 additions & 6 deletions fast-barcode-scanner/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
apply plugin: 'com.android.library'

ext {
PUBLISH_GROUP_ID = 'dk.schaumburgit.fast-barcode-scanner'
PUBLISH_ARTIFACT_ID = 'fast-barcode-scanner'
PUBLISH_VERSION = '1.0.4'
DESCRIPTION = 'Fast barcode scanning library for Android apps.'
}

android {
Expand Down Expand Up @@ -33,4 +29,4 @@ dependencies {
compile project(':tracking-barcode-scanner')
}

apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
//apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,17 @@ public class FastBarcodeScanner {

/**
* Creates a headless FastBarcodeScanner (i.e. one without any UI)
* <p/>
*
* FastBarcodeScanner instances created using this constructor will use
* the new, efficient Camera2 API for controlling the camera.
* <p/>
*
* This boosts performance by a factor 5x - but it only works on Android
* Lollipop (API version 21) and later.
* <p/>
*
* As an alternative, consider using the #FastBarcodeScanner constructor
* which will create a FastBarcodeScanner working on older versions of
* Android too - albeit much less efficiently.
* <p/>
*
* The following properties control the behaviour of the barcode scanning
* (see #TrackingBarcodeScanner for details): UseTracking, RelativeTrackingMargin,
* NoHitsBeforeTrackingLoss.
Expand All @@ -107,13 +107,13 @@ public FastBarcodeScanner(Activity activity, int resolution) {

/**
* Creates a FastBarcodeScanner using the given TextureView for preview.
* <p/>
*
* FastBarcodeScanner instances created using this constructor will use
* the new, much more efficient Camera2 API for controlling the camera.
* <p/>
*
* This boosts performance by a factor 5x - but it only works on Android
* Lollipop (API version 21) and later.
* <p/>
*
* As an alternative, consider using the #FastBarcodeScanner constructor
* which will create a FastBarcodeScanner working on older versions of
* Android too - albeit much less efficiently.
Expand Down Expand Up @@ -160,7 +160,7 @@ private static int calculateCheapestFormat(Map<Integer, Double> cost1, Map<Integ
/**
* Creates a FastBarcodeScanner using the deprecated Camera API supported
* on Android versions prior to Lollipop (API level lower than 21).
* <p/>
*
* The created FastBarcodeScanner will display preview output in the supplied
* SurfaceView. This parameter *must* be non-null, and the referenced SurfaceView
* *must* be displayed on-screen, with a minimum size of 1x1 pixels. This is a
Expand Down Expand Up @@ -205,13 +205,13 @@ public FastBarcodeScanner(Activity activity, SurfaceView surfaceView, int resolu
* be called using the supplied handler whenever
* there's a *change* in the barcode seen (i.e. if 200 consecutive images contain
* the same barcode, only the first will generate a callback).
* <p/>
*
* "No barcode" is signalled with a null value via the callback.
* <p/>
*
* Example: After StartScan is called, the first 20 images contain no barcode, the
* next 200 have barcode A, the next 20 have nothing. This will generate the
* following callbacks:
* <p/>
*
* Frame#1: onBarcodeAvailable(null)
* Frame#21: onBarcodeAvailable("A")
* Frame#221: onBarcodeAvailable(null)
Expand Down Expand Up @@ -299,7 +299,7 @@ public void onError(Exception error) {
/**
* Stops the scanning process started by StartScan() or StartMultiScan() and frees any shared system resources
* (e.g. the camera). StartScan() or StartMultiScan() can always be called to restart.
* <p/>
*
* StopScan() and StartScan()/StartMultiScan() are thus well suited for use from the onPause() and onResume()
* handlers of a calling application.
*/
Expand Down Expand Up @@ -334,7 +334,7 @@ public interface ErrorDetectedListener {

/**
* Callback interface for being notified that a barcode has been detected.
* <p/>
*
* <p>
* The onBarcodeAvailable is called when a new barcode is detected - that is,
* if the same barcode is detected in 20 consecutive frames, onBarcodeAvailable
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
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'
9 changes: 3 additions & 6 deletions still-sequence-camera/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
apply plugin: 'com.android.library'

ext {
PUBLISH_GROUP_ID = 'dk.schaumburgit.fast-barcode-scanner'
PUBLISH_ARTIFACT_ID = 'still-sequence-camera'
PUBLISH_VERSION = '1.0.4'
DESCRIPTION = 'A library allowing apps to take fast sequences of still images without any UI preview'
}

android {
Expand All @@ -24,9 +20,10 @@ android {
}
}


dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
}

apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
//apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ private static double getFormatCost(int format) {

/**
* Selects a back-facing camera, opens it and starts focusing.
* <p/>
*
* The #start() method can be called immediately when this method returns
* <p/>
*
* If setup() returns successfully, the StillSequenceCamera enters the INITIALIZED state.
*
* @throws IllegalStateException if the StillSequenceCamera is in any but the CLOSED state
Expand Down Expand Up @@ -180,9 +180,9 @@ public void setup(int format)
/**
* Starts the preview (displaying it in the #SurfaceView provided in the constructor),
* and starts taking pictures as rapidly as possible.
* <p/>
*
* This continues until #stop() is called.
* <p/>
*
* If start() returns successfully, the StillSequenceCamera enters the CAPTURING state.
*
* @param listener Every time a picture is taken, this callback interface is called.
Expand Down Expand Up @@ -260,7 +260,7 @@ public void surfaceDestroyed(SurfaceHolder holder) {

/**
* Stops the preview, and stops the capture of still images.
* <p/>
*
* If stop() returns successfully, the StillSequenceCamera enters the STOPPED state.
*
* @throws IllegalStateException if stop is called in any but the STARTED state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public FocusManager(Activity activity, TextureView textureView)

/**
* Sets up member variables related to the on-screen preview (if any).
* @param cameraId
* @param cameraId Id of the camera
*/
public void setup(String cameraId) {
try {
Expand Down Expand Up @@ -284,11 +284,12 @@ public static interface FocusListener

/**
*
* @param cameraCaptureSession
* @param cameraCaptureSession Session
* @param callbackHandler the handler on which the listener should be invoked, or
* {@code null} to use the current thread's {@link android.os.Looper
* looper}.
* @param listener
* @param listener Listener receiving callbacks
* @param lockFocus l
*/
public void start(CameraCaptureSession cameraCaptureSession, boolean lockFocus, Handler callbackHandler, FocusListener listener)
{
Expand Down
8 changes: 1 addition & 7 deletions tracking-barcode-scanner/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
apply plugin: 'com.android.library'

ext {
PUBLISH_GROUP_ID = 'dk.schaumburgit.fast-barcode-scanner'
PUBLISH_ARTIFACT_ID = 'tracking-barcode-scanner'
PUBLISH_VERSION = '1.0.4'
DESCRIPTION = 'A wrapper around the ZXing core library, optimized for use with video-like image sequences'
}

android {
Expand All @@ -29,5 +25,3 @@ dependencies {
testCompile 'junit:junit:4.12'
compile 'com.google.zxing:core:3.2.1'
}

apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'

0 comments on commit 4896931

Please sign in to comment.