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

Commit

Permalink
Merge pull request #183 from mintware-de/prepare-release
Browse files Browse the repository at this point in the history
Features:
- [Add-to-app support](#168) - @santiihoyos
- Changed overlay to full screen in iOS 13

Bugfixes:
- [Fixed rotation on iOS](#167) - @mintware-de
  - [#61 Rotating orientation on iPhones only shows half the screen](#61)

Changes:
- [Fix compile warning](#127) - @lookfirst
- [Upgrade gradle](#142) - @SuuSoJeat
  - `com.android.tools.build:gradle`: 3.3.1 -> 3.5.0
  - `org.jetbrains.kotlin:kotlin-gradle-plugin`: 1.3.20 -> 1.3.50
  - `compileSdkVersion`: 28 -> 29
  - `targetSdkVersion`: 28 -> 29
  - `gradle`: 4.10.2 -> 5.4.1
- [Package description updated](#180) - @connectety
- README.md and LICENSE.md updated
- Since the project owner has been changed, the package names are different. Checkout the [UPGRADE.md](./UPGRADE.md) for details.
  • Loading branch information
devtronic authored Feb 19, 2020
2 parents fd166d9 + d96581e commit 0c58999
Show file tree
Hide file tree
Showing 20 changed files with 124 additions and 130 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ build/
ios/.generated/
packages
pubspec.lock
example/ios/Podfile.lock
26 changes: 14 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,56 @@

Features:
- [Add-to-app support](https://github.com/mintware-de/flutter_barcode_reader/pull/168) - @santiihoyos
- Changed overlay to full screen in iOS 13

Bugfixes:
- [Fixed rotation on iOS](https://github.com/mintware-de/flutter_barcode_reader/pull/167) - @mintware-de
- [#61 Rotating orientation on iPhones only shows half the screen](https://github.com/mintware-de/flutter_barcode_reader/issues/61)

Changes:
- [Fix compile warning](https://github.com/apptreesoftware/flutter_barcode_reader/pull/127) - @lookfirst
- [Fix compile warning](https://github.com/mintware-de/flutter_barcode_reader/pull/127) - @lookfirst
- [Upgrade gradle](https://github.com/mintware-de/flutter_barcode_reader/pull/142) - @SuuSoJeat
- `com.android.tools.build:gradle`: 3.3.1 -> 3.5.0
- `org.jetbrains.kotlin:kotlin-gradle-plugin`: 1.3.20 -> 1.3.50
- `compileSdkVersion`: 28 -> 29
- `targetSdkVersion`: 28 -> 29
- `gradle`: 4.10.2 -> 5.4.1
- [Package description updated](https://github.com/mintware-de/flutter_barcode_reader/pull/180) - @connectety
- README.md and LICENSE.md updated
- Since the project owner has been changed, the package names are different. Checkout the [UPGRADE.md](./UPGRADE.md) for details.


## [1.0.0] - 8/30/18
## v1.0.0 - 2018-08-30

Breaking Change: Adds support for AndroidX

## [0.0.8] - 8/30/18
## v0.0.8 - 2018-08-30

* Fixes [iOS: pressing cancel doesn't stop scanning](https://github.com/apptreesoftware/flutter_barcode_reader/issues/60) thanks to @tgezginis.
* Fixes [iOS: pressing cancel doesn't stop scanning](https://github.com/mintware-de/flutter_barcode_reader/issues/60) thanks to @tgezginis.

## [0.0.7] - 8/30/18
## v0.0.7 - 2018-08-30

* Fix iOS barcodes not scanning

## [0.0.6] - 8/29/18
## v0.0.6 - 2018-08-29

* Fix android dependencies
* iOS scanner now looks like Android thanks to @dustin-graham

## [0.0.4] - 2/8/18
## v0.0.4 - 2018-02-8

* Fix missing gradle dependency (thanks to [toteto](https://github.com/apptreesoftware/flutter_barcode_reader/pull/15))
* Fix missing gradle dependency (thanks to [toteto](https://github.com/mintware-de/flutter_barcode_reader/pull/15))
* Update gradle dependencies

## [0.0.3] - 2/8/17
## v0.0.3 - 2017-02-8

* Improved permission handling (thanks to [BenSower](https://github.com/BenSower))
* Added MIT license

## [0.0.2] - 11/7/17
## v0.0.2 - 2017-11-7

* Rewrite iOS scanner in Objective-C to avoid Swift use_frameworks! conflicts with other plugins (see https://github.com/flutter/flutter/issues/10968)

## [0.0.1] - 10/29/17
## v0.0.1 - 2017-10-29

* Supports 2D & QR Codes
* Control flash while scanning
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License

Copyright (c) 2018 AppTree Software http://www.apptreesoftware.com
Copyright (c) 2020 Julian Finkler https://www.mintware.de
Copyright (c) 2018-2019 AppTree Software http://www.apptreesoftware.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
61 changes: 35 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[![GitHub license](https://img.shields.io/github/license/mintware-de/flutter_barcode_reader.svg)](https://github.com/mintware-de/flutter_barcode_reader/blob/master/LICENSE)
[![GitHub stars](https://img.shields.io/github/stars/mintware-de/flutter_barcode_reader)](https://github.com/mintware-de/flutter_barcode_reader/stargazers)
[![Pub](https://img.shields.io/pub/v/barcode_scan.svg)](https://pub.dartlang.org/packages/barcode_scan)
[![GitHub forks](https://img.shields.io/github/forks/mintware-de/flutter_barcode_reader)](https://github.com/mintware-de/flutter_barcode_reader/network)

# Barcode Scanner

A flutter plugin for scanning 2D barcodes and QR codes.
Expand All @@ -13,7 +18,6 @@ Android: https://github.com/dm77/barcodescanner
- [x] Scan QR codes
- [x] Control the flash while scanning
- [x] Permission handling
- [ ] Support multiple barcode libraries

## Getting Started

Expand All @@ -24,44 +28,49 @@ For Android, you must do the following before you can use the plugin:

`<uses-permission android:name="android.permission.CAMERA" />`

* Add the BarcodeScanner activity to your AndroidManifest.xml. Do NOT modify the name.

`<activity android:name="com.apptreesoftware.barcodescan.BarcodeScannerActivity"/>`


* This plugin is written in Kotlin. Therefore, you need to add Kotlin support to your project. See [installing the Kotlin plugin](https://kotlinlang.org/docs/tutorials/kotlin-android.html#installing-the-kotlin-plugin).

Edit your project-level build.gradle file to look like this:

buildscript {
ext.kotlin_version = '1.3.21'
...
dependencies {
...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
...
```groovy
buildscript {
ext.kotlin_version = '1.3.61'
// ...
dependencies {
// ...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
// ...
```

Edit your app-level build.gradle file to look like this:

apply plugin: 'kotlin-android'
...
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
...
}
```groovy
apply plugin: 'kotlin-android'
// ...
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// ...
}
```

Now you can depend on the barcode_scan plugin in your pubspec.yaml file:

dependencies:
...
barcode_scan: any

```yaml
dependencies:
# ...
barcode_scan: any
```
Click "Packages get" in Android Studio or run `flutter packages get` in your project folder.

### iOS
To use on iOS, you must add the the camera usage description to your Info.plist

```xml
<dict>
<!-- ... -->
<key>NSCameraUsageDescription</key>
<string>Camera permission is required for barcode scanning.</string>
<!-- ... -->
</dict>
```
25 changes: 25 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Upgrade from 1.0.0 to 2.0.0

The simples way for upgrading is by replacing:
- `com.apptreesoftware.barcodescan`
- `com.yourcompany.barcodescan`
- `com.apptreesoftware.barcode_scan`

With: `de.mintware.barcode_scan`

Detailed changes:
Android:
Kotlin Package: `com.apptreesoftware.barcodescan` -> `de.mintware.barcode_scan`
Manifest-Package: `com.yourcompany.barcodescan` -> `de.mintware.barcodescan`
Activity: `com.apptreesoftware.barcodescan.BarcodeScannerActivity` -> `de.mintware.barcode_scan.BarcodeScannerActivity`

iOS:
Bundle ID: `com.apptreesoftware.barcode.plugin.example` -> `de.mintware.barcode_scan.plugin.example`

Flutter:
Method channel: `com.apptreesoftware.barcode_scan` -> `de.mintware.barcode_scan`
pubspec.yaml:
- homepage updated
- deprecated author entry removed
- comments removed
- flutter.plugin.androidPackage: `com.apptreesoftware.barcode_scan` -> `de.mintware.barcode_scan`
6 changes: 4 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
group 'com.apptreesoftware.barcodescan'
package android

group 'de.mintware.barcode_scan'
version '1.0-SNAPSHOT'

buildscript {
Expand All @@ -9,7 +11,7 @@ buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.61"
}
}

Expand Down
4 changes: 2 additions & 2 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yourcompany.barcodescan">
package="de.mintware.barcodescan">

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

<application>
<activity android:name="com.apptreesoftware.barcodescan.BarcodeScannerActivity" />
<activity android:name="de.mintware.barcode_scan.BarcodeScannerActivity" />
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.apptreesoftware.barcodescan
package de.mintware.barcode_scan

import android.app.Activity
import android.content.Intent
Expand All @@ -16,7 +16,7 @@ class BarcodeScanPlugin(private val registrar: Registrar) : MethodCallHandler, P
companion object {
@JvmStatic
fun registerWith(registrar: Registrar) {
val channel = MethodChannel(registrar.messenger(), "com.apptreesoftware.barcode_scan")
val channel = MethodChannel(registrar.messenger(), "de.mintware.barcode_scan")
val plugin = BarcodeScanPlugin(registrar)
channel.setMethodCallHandler(plugin)
registrar.addActivityResultListener(plugin)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.apptreesoftware.barcodescan
package de.mintware.barcode_scan

import android.Manifest
import android.app.Activity
Expand Down
5 changes: 5 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ ios/.generated/
packages
pubspec.lock
.flutter-plugins
.flutter-plugins-dependencies
ios/Flutter.podspec
ios/Flutter/Flutter.podspec
ios/Flutter/flutter_export_environment.sh
ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
4 changes: 2 additions & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ android {

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.yourcompany.barcodescanexample"
applicationId "de.mintware.barcode_scan_example"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
Expand Down
4 changes: 2 additions & 2 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yourcompany.barcodescanexample">
package="de.mintware.barcode_scan_example">

<!-- The INTERNET permission is required for development. Specifically,
flutter needs it to communicate with the running application
Expand All @@ -16,7 +16,7 @@
android:label="barcode_scan_example"
android:icon="@mipmap/ic_launcher">
<activity
android:name="com.apptreesoftware.barcodescanexample.MainActivity"
android:name="de.mintware.barcode_scan_example.MainActivity"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.apptreesoftware.barcodescanexample
package de.mintware.barcode_scan_example

import android.os.Bundle

Expand Down
3 changes: 3 additions & 0 deletions example/android/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
2 changes: 1 addition & 1 deletion example/ios/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ Icon?
/Flutter/Generated.xcconfig
/ServiceDefinitions.json

Pods/
Pods/
29 changes: 0 additions & 29 deletions example/ios/Podfile.lock

This file was deleted.

9 changes: 3 additions & 6 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@
TargetAttributes = {
97C146ED1CF9000F007C117D = {
CreatedOnToolsVersion = 7.3.1;
DevelopmentTeam = RTZBJSE8E8;
LastSwiftMigration = 0830;
};
};
Expand Down Expand Up @@ -274,7 +273,7 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
"${PODS_ROOT}/../../../../../../Library/flutter/bin/cache/artifacts/engine/ios/Flutter.framework",
"${PODS_ROOT}/../../../../../development/flutter/bin/cache/artifacts/engine/ios/Flutter.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
Expand Down Expand Up @@ -416,7 +415,6 @@
ARCHS = arm64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
DEVELOPMENT_TEAM = RTZBJSE8E8;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -428,7 +426,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.apptreesoftware.barcode.plugin.example;
PRODUCT_BUNDLE_IDENTIFIER = de.mintware.barcode_scan.plugin.example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -443,7 +441,6 @@
ARCHS = arm64;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
DEVELOPMENT_TEAM = RTZBJSE8E8;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -455,7 +452,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
PRODUCT_BUNDLE_IDENTIFIER = com.apptreesoftware.barcode.plugin.example;
PRODUCT_BUNDLE_IDENTIFIER = de.mintware.barcode_scan.plugin.example;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 4.0;
Expand Down
Loading

0 comments on commit 0c58999

Please sign in to comment.