Add Gradle build config to PluginQR and update it to match new source conventions.

Version code is bumped because there was a minor code change to avoid a
fatal lint error complaining about a memory leak.

Fixes #489.
This commit is contained in:
Alexander Dorokhine
2018-11-10 22:34:05 -08:00
parent 80fbd656a7
commit fa0e06df75
153 changed files with 331 additions and 30 deletions

View File

@@ -7,4 +7,7 @@ call gradlew assemble
cd ..\Keepass2AndroidPluginSDK2 cd ..\Keepass2AndroidPluginSDK2
call gradlew assemble call gradlew assemble
cd ..\..\build-scripts cd ..\PluginQR
call gradlew assemble
cd ..\..\build-scripts

View File

@@ -15,4 +15,8 @@ pushd Keepass2AndroidPluginSDK2
./gradlew assemble ./gradlew assemble
popd popd
pushd PluginQR
./gradlew assemble
popd
popd popd

1
src/java/PluginQR/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

1
src/java/PluginQR/app/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
/build

View 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'
}

View File

@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="keepass2android.plugin.qr" package="keepass2android.plugin.qr" >
android:versionCode="2"
android:versionName="1.0.1" >
<uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.CAMERA"/>
<uses-permission <uses-permission
@@ -15,10 +13,6 @@
<uses-feature android:name="android.hardware.camera.flash" android:required="false"/> <uses-feature android:name="android.hardware.camera.flash" android:required="false"/>
<uses-feature android:name="android.hardware.screen.portrait" android:required="false"/> <uses-feature android:name="android.hardware.screen.portrait" android:required="false"/>
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<application <application
android:allowBackup="true" android:allowBackup="true"
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"

View File

@@ -61,7 +61,7 @@ public final class WifiResultHandler extends ResultHandler {
public void handleButtonPress(int index) { public void handleButtonPress(int index) {
if (index == 0) { if (index == 0) {
WifiParsedResult wifiResult = (WifiParsedResult) getResult(); WifiParsedResult wifiResult = (WifiParsedResult) getResult();
WifiManager wifiManager = (WifiManager) getActivity().getSystemService(Context.WIFI_SERVICE); WifiManager wifiManager = (WifiManager) getActivity().getApplicationContext().getSystemService(Context.WIFI_SERVICE);
if (wifiManager == null) { if (wifiManager == null) {
Log.w(TAG, "No WifiManager available from device"); Log.w(TAG, "No WifiManager available from device");
return; return;

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Some files were not shown because too many files have changed in this diff Show More