Merge pull request #612 from adorokhine/gradle-build
Add Gradle build config to PluginQR and update to match source conventions.
@@ -7,4 +7,7 @@ call gradlew assemble
 | 
			
		||||
cd ..\Keepass2AndroidPluginSDK2
 | 
			
		||||
call gradlew assemble
 | 
			
		||||
 | 
			
		||||
cd ..\..\build-scripts
 | 
			
		||||
cd ..\PluginQR
 | 
			
		||||
call gradlew assemble
 | 
			
		||||
 | 
			
		||||
cd ..\..\build-scripts
 | 
			
		||||
 
 | 
			
		||||
@@ -15,4 +15,8 @@ pushd Keepass2AndroidPluginSDK2
 | 
			
		||||
./gradlew assemble
 | 
			
		||||
popd
 | 
			
		||||
 | 
			
		||||
pushd PluginQR
 | 
			
		||||
./gradlew assemble
 | 
			
		||||
popd
 | 
			
		||||
 | 
			
		||||
popd
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								src/java/PluginQR/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1 @@
 | 
			
		||||
/build
 | 
			
		||||
							
								
								
									
										1
									
								
								src/java/PluginQR/app/.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1 @@
 | 
			
		||||
/build
 | 
			
		||||
							
								
								
									
										37
									
								
								src/java/PluginQR/app/build.gradle
									
									
									
									
									
										Normal file
									
								
							
							
						
						@@ -0,0 +1,37 @@
 | 
			
		||||
apply plugin: 'com.android.application'
 | 
			
		||||
 | 
			
		||||
android {
 | 
			
		||||
    compileSdkVersion 26
 | 
			
		||||
    buildToolsVersion '26.0.2'
 | 
			
		||||
 | 
			
		||||
    defaultConfig {
 | 
			
		||||
        applicationId "keepass2android.plugin.qr"
 | 
			
		||||
        minSdkVersion 14
 | 
			
		||||
        targetSdkVersion 19
 | 
			
		||||
        versionCode 3
 | 
			
		||||
        versionName "1.0.2"
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    buildTypes {
 | 
			
		||||
        release {
 | 
			
		||||
            minifyEnabled true
 | 
			
		||||
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    compileOptions {
 | 
			
		||||
        sourceCompatibility 1.8
 | 
			
		||||
        targetCompatibility 1.8
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    lintOptions {
 | 
			
		||||
        disable 'ExtraTranslation'
 | 
			
		||||
        disable 'MissingTranslation'
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
dependencies {
 | 
			
		||||
    compile project(':Keepass2AndroidPluginSDK2')
 | 
			
		||||
    compile 'com.google.zxing:core:2.3.0'
 | 
			
		||||
}
 | 
			
		||||
@@ -1,8 +1,6 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 | 
			
		||||
    package="keepass2android.plugin.qr"
 | 
			
		||||
    android:versionCode="2"
 | 
			
		||||
    android:versionName="1.0.1" >
 | 
			
		||||
    package="keepass2android.plugin.qr" >
 | 
			
		||||
    
 | 
			
		||||
    <uses-permission android:name="android.permission.CAMERA"/>
 | 
			
		||||
     <uses-permission
 | 
			
		||||
@@ -15,10 +13,6 @@
 | 
			
		||||
	<uses-feature android:name="android.hardware.camera.flash" android:required="false"/>
 | 
			
		||||
	<uses-feature android:name="android.hardware.screen.portrait" android:required="false"/>
 | 
			
		||||
 | 
			
		||||
    <uses-sdk
 | 
			
		||||
        android:minSdkVersion="14"
 | 
			
		||||
        android:targetSdkVersion="19" />
 | 
			
		||||
 | 
			
		||||
    <application
 | 
			
		||||
        android:allowBackup="true"
 | 
			
		||||
        android:icon="@drawable/ic_launcher"
 | 
			
		||||
@@ -61,7 +61,7 @@ public final class WifiResultHandler extends ResultHandler {
 | 
			
		||||
  public void handleButtonPress(int index) {
 | 
			
		||||
    if (index == 0) {
 | 
			
		||||
      WifiParsedResult wifiResult = (WifiParsedResult) getResult();
 | 
			
		||||
      WifiManager wifiManager = (WifiManager) getActivity().getSystemService(Context.WIFI_SERVICE);
 | 
			
		||||
      WifiManager wifiManager = (WifiManager) getActivity().getApplicationContext().getSystemService(Context.WIFI_SERVICE);
 | 
			
		||||
      if (wifiManager == null) {
 | 
			
		||||
        Log.w(TAG, "No WifiManager available from device");
 | 
			
		||||
        return;
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB  | 
| 
		 Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB  | 
| 
		 Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB  | 
| 
		 Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB  | 
| 
		 Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB  | 
| 
		 Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB  | 
| 
		 Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB  | 
| 
		 Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB  | 
| 
		 Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB  | 
| 
		 Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB  | 
| 
		 Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB  |