From 0f01bdd77581d505339c6b48e2d02a6bd816e89c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karol=20Wr=C3=B3tniak?= Date: Thu, 7 Feb 2019 19:40:36 +0100 Subject: [PATCH] Dependencies versions bump Add chuck plugin Add device info plugin Add app info plugin --- README.md | 4 +- build.gradle | 9 ++++- gradle.properties | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- library/build.gradle | 4 ++ library/src/main/AndroidManifest.xml | 12 +++++- .../droidsonroids/foqa/DeviceInfoPlugin.java | 20 ++++++++++ .../pl/droidsonroids/foqa/InitProvider.java | 40 +++++++++++++++++++ 8 files changed, 86 insertions(+), 7 deletions(-) create mode 100644 library/src/main/java/pl/droidsonroids/foqa/DeviceInfoPlugin.java create mode 100644 library/src/main/java/pl/droidsonroids/foqa/InitProvider.java diff --git a/README.md b/README.md index 1932d34..ef298f5 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,14 @@ Add FoQA dependency to `build.gradle` of the application module: ```groovy dependencies { - debugImplementation 'pl.droidsonroids:foqa:0.0.1' + debugImplementation 'com.github.droidsonroids:foqa:0.0.2' } ``` If not already present add Maven Central repository: ```groovy repositories { - mavenCentral() + maven { url 'https://jitpack.io' } } ``` diff --git a/build.gradle b/build.gradle index d19bf75..a90fe46 100644 --- a/build.gradle +++ b/build.gradle @@ -3,11 +3,15 @@ buildscript { minSdk : 21, compileSdk : 28, targetSdk : 28, - androidGradlePlugin: '3.3.0', + androidGradlePlugin: '3.3.1', mavenPublishPlugin : '0.7.0', versionsPlugin : '0.20.0', hyperion : '0.9.27', - debugDb : '1.0.4' + debugDb : '1.0.4', + hyperionChuck : '1.0.0', + hyperionAppInfo : '1.0.0', + hyperionSimpleItem : '0.4.0', + deviceNames : '1.1.8', ] repositories { @@ -27,6 +31,7 @@ subprojects { repositories { google() mavenCentral() + maven { url 'https://jitpack.io' } jcenter() } } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index ebefc77..c20cea3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -VERSION_NAME=0.0.1 +VERSION_NAME=0.0.2 GROUP=pl.droidsonroids POM_DESCRIPTION=Various Quality Assurance utilities to be included in QA/testing variants of Android apps POM_URL=https://github.com/DroidsOnRoids/FoQA diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 558870d..5a7a6a1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/library/build.gradle b/library/build.gradle index e7435a1..977c15f 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -26,6 +26,10 @@ dependencies { implementation "com.willowtreeapps.hyperion:hyperion-geiger-counter:$versions.hyperion" implementation "com.willowtreeapps.hyperion:hyperion-timber:$versions.hyperion" implementation "com.willowtreeapps.hyperion:hyperion-build-config:$versions.hyperion" + implementation "com.github.Commit451:Hyperion-Chuck:$versions.hyperionChuck" + implementation "com.star_zero:hyperion-appinfo:$versions.hyperionAppInfo" + implementation "com.github.takahirom:Hyperion-Simple-Item:$versions.hyperionSimpleItem" + implementation "com.jaredrummler:android-device-names:$versions.deviceNames" implementation "com.amitshekhar.android:debug-db:$versions.debugDb" } \ No newline at end of file diff --git a/library/src/main/AndroidManifest.xml b/library/src/main/AndroidManifest.xml index e5980e5..d7ef1aa 100644 --- a/library/src/main/AndroidManifest.xml +++ b/library/src/main/AndroidManifest.xml @@ -1 +1,11 @@ - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/library/src/main/java/pl/droidsonroids/foqa/DeviceInfoPlugin.java b/library/src/main/java/pl/droidsonroids/foqa/DeviceInfoPlugin.java new file mode 100644 index 0000000..7f31e13 --- /dev/null +++ b/library/src/main/java/pl/droidsonroids/foqa/DeviceInfoPlugin.java @@ -0,0 +1,20 @@ +package pl.droidsonroids.foqa; + +import android.os.Build; + +import com.github.takahirom.hyperion.plugin.simpleitem.SimpleItem; +import com.github.takahirom.hyperion.plugin.simpleitem.SimpleItemHyperionPlugin; +import com.jaredrummler.android.device.DeviceName; + +final class DeviceInfoPlugin { + + static void initialize() { + String manufacturer = Build.MANUFACTURER; + String deviceModel = DeviceName.getDeviceName(); + String sdk = Build.VERSION.RELEASE; + SimpleItem item = new SimpleItem.Builder() + .text(manufacturer + ' ' + deviceModel + " Android: " + sdk) + .build(); + SimpleItemHyperionPlugin.addItem(item); + } +} diff --git a/library/src/main/java/pl/droidsonroids/foqa/InitProvider.java b/library/src/main/java/pl/droidsonroids/foqa/InitProvider.java new file mode 100644 index 0000000..2ffdb5e --- /dev/null +++ b/library/src/main/java/pl/droidsonroids/foqa/InitProvider.java @@ -0,0 +1,40 @@ +package pl.droidsonroids.foqa; + +import android.content.ContentProvider; +import android.content.ContentValues; +import android.database.Cursor; +import android.net.Uri; + +public class InitProvider extends ContentProvider { + + @Override + public boolean onCreate() { + DeviceInfoPlugin.initialize(); + return true; + } + + @Override + public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { + return null; + } + + @Override + public String getType(Uri uri) { + return null; + } + + @Override + public Uri insert(Uri uri, ContentValues values) { + return null; + } + + @Override + public int delete(Uri uri, String selection, String[] selectionArgs) { + return 0; + } + + @Override + public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) { + return 0; + } +}