Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -231,3 +231,6 @@ target/

*.iml

atlassian-ide-plugin.xml

.gradle/
18 changes: 0 additions & 18 deletions AndroidManifest.xml

This file was deleted.

20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
How to use:

First build the project and reference the jar (or project) in your Android project.
The easiest way to build is to use gradle, just run ``./gradlew assemble``
Then in your Android project create the layout for the scan-view which can be as easy as:

```xml
Expand Down Expand Up @@ -118,12 +119,23 @@ public class ScanActivity extends Activity
}
```

To use it as a Gradle-dependency, just add
```groovy
compile('com.github.henningms:simplecamerareader-android:1.0@aar') {
transitive = true
}
```

To your build.gradle

To use it as a maven dependency, just add
```xml
<groupId>no.henning</groupId>
<artifactId>simple-camera-reader</artifactId>
<version>1.0</version>
<type>apklib</type>
<dependency>
<groupId>com.github.henningms</groupId>
<artifactId>simplecamerareader-android</artifactId>
<version>1.0</version>
<type>aar</type>
</dependency>
```

To your pom.
Expand Down
116 changes: 116 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
}
}
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'

repositories {
jcenter()
}

group = 'com.github.henningms'
version = '1.0'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
minSdkVersion 7
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}

bintray {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())

user = properties.getProperty('bintray.user')
key = properties.getProperty('bintray.apikey')

configurations = ['archives']
pkg {
repo = 'maven'
name = 'simplecamerareader-android'
desc = 'A wrapper around the ZXing Library for Android, making it easier to use'
websiteUrl = 'https://github.com/henningms/simplecamerareader-android'
issueTrackerUrl = 'https://github.com/henningms/simplecamerareader-android/issues'
vcsUrl = 'https://github.com/henningms/simplecamerareader-android.git'
licenses = ['Apache-2.0']
labels = ['aar', 'android', 'zxing']
publicDownloadNumbers = true
}
}

install {
repositories.mavenInstaller {
pom {
project {
packaging 'aar'
name 'A wrapper around the ZXing Library for Android, making it easier to use'
url 'https://github.com/henningms/simplecamerareader-android'
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
id 'henningms'
name 'Henning Mosand Stephansen'
email 'henningms@gmail.com'
}
}
scm {
connection 'https://github.com/henningms/simplecamerareader-android.git'
developerConnection 'https://github.com/henningms/simplecamerareader-android.git'
url 'https://github.com/henningms/simplecamerareader-android'
}
}
}
}
}

dependencies {
compile 'com.google.zxing:core:2.2'
}

task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
source = android.sourceSets.main.java.srcDirs
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
}

task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
// TODO: JavaDoc doesn't compile
// archives javadocJar
archives sourcesJar
}
2 changes: 1 addition & 1 deletion default.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# File used by Eclipse to determine the target system
# Project target.
target=android-7
target=android-7
18 changes: 18 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx10248m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Thu Feb 12 21:38:23 CET 2015
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
164 changes: 164 additions & 0 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading