diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index 3d1caa2..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-Jarvis
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 0970cfb..0c61684 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -14,6 +14,7 @@
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index bfac66e..bef5f86 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -35,6 +35,7 @@
+
diff --git a/build.gradle b/build.gradle
index c91591f..b379e26 100644
--- a/build.gradle
+++ b/build.gradle
@@ -4,6 +4,7 @@ buildscript {
ext.hilt_version = '2.38.1'
ext.minimum_supported_android_version = 16
+ ext.maximum_supported_android_version = 32
repositories {
google()
diff --git a/jarvis-app/build.gradle b/jarvis-app/build.gradle
index 1783840..f363059 100644
--- a/jarvis-app/build.gradle
+++ b/jarvis-app/build.gradle
@@ -6,13 +6,13 @@ plugins {
}
android {
- compileSdkVersion 32
+ compileSdkVersion maximum_supported_android_version
buildToolsVersion "32.0.0"
defaultConfig {
applicationId "com.jarvis.app"
minSdkVersion minimum_supported_android_version
- targetSdkVersion 32
+ targetSdkVersion maximum_supported_android_version
versionCode 1
versionName "1.0"
@@ -50,10 +50,10 @@ dependencies {
implementation project(':jarvis-client')
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2"
- implementation "com.google.android.material:material:1.5.0"
+ implementation "com.google.android.material:material:1.6.0"
implementation "androidx.core:core-ktx:1.7.0"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1"
- implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.5.0-beta01"
+ implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.5.0-rc01"
implementation "androidx.fragment:fragment-ktx:1.4.1"
implementation "com.google.dagger:hilt-android:$hilt_version"
diff --git a/jarvis-app/src/main/res/values/strings.xml b/jarvis-app/src/main/res/values/strings.xml
index e378b0d..d80ec4f 100644
--- a/jarvis-app/src/main/res/values/strings.xml
+++ b/jarvis-app/src/main/res/values/strings.xml
@@ -2,7 +2,7 @@
Jarvis
- No config.\n\nEnsure the Jarvis App is installed and unlocked.\n\nEnsure the Jarvis config is pushed from your app to the Jarvis App.
+ No config.\n\nEnsure the Jarvis App is unlocked and a Jarvis config is pushed from your app to the Jarvis App.
Active
diff --git a/jarvis-client/build.gradle b/jarvis-client/build.gradle
index 6983505..5d3bcc2 100644
--- a/jarvis-client/build.gradle
+++ b/jarvis-client/build.gradle
@@ -5,12 +5,12 @@ plugins {
}
android {
- compileSdkVersion 32
+ compileSdkVersion maximum_supported_android_version
buildToolsVersion "32.0.0"
defaultConfig {
minSdkVersion minimum_supported_android_version
- targetSdkVersion 32
+ targetSdkVersion maximum_supported_android_version
}
compileOptions {
diff --git a/jarvis-demo-advanced/build.gradle b/jarvis-demo-advanced/build.gradle
index eff6920..41ed635 100644
--- a/jarvis-demo-advanced/build.gradle
+++ b/jarvis-demo-advanced/build.gradle
@@ -4,15 +4,16 @@ plugins {
}
android {
- compileSdkVersion 32
+ compileSdkVersion maximum_supported_android_version
buildToolsVersion "32.0.0"
defaultConfig {
applicationId "com.jarvis.demo.advanced"
minSdkVersion minimum_supported_android_version
- targetSdkVersion 32
+ targetSdkVersion maximum_supported_android_version
versionCode 1
versionName "1.0"
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -41,5 +42,5 @@ dependencies {
// debugImplementation "com.github.slambang:jarvis:v1.0.0" // latest published
implementation "io.insert-koin:koin-android:3.1.6"
- implementation "com.google.android.material:material:1.5.0"
+ implementation "com.google.android.material:material:1.6.0"
}
diff --git a/jarvis-demo-advanced/src/debug/AndroidManifest.xml b/jarvis-demo-advanced/src/debug/AndroidManifest.xml
index 769c51a..b450b8e 100644
--- a/jarvis-demo-advanced/src/debug/AndroidManifest.xml
+++ b/jarvis-demo-advanced/src/debug/AndroidManifest.xml
@@ -8,6 +8,7 @@
+
-
diff --git a/jarvis-demo-advanced/src/main/res/values/strings.xml b/jarvis-demo-advanced/src/main/res/values/strings.xml
index d7a5855..eb01e8e 100644
--- a/jarvis-demo-advanced/src/main/res/values/strings.xml
+++ b/jarvis-demo-advanced/src/main/res/values/strings.xml
@@ -1,4 +1,4 @@
- Jarvis Demo Advanced
+ Jarvis Demo: Advanced
Read value
diff --git a/jarvis-demo-simple/.gitignore b/jarvis-demo-simple/.gitignore
new file mode 100644
index 0000000..42afabf
--- /dev/null
+++ b/jarvis-demo-simple/.gitignore
@@ -0,0 +1 @@
+/build
\ No newline at end of file
diff --git a/jarvis-demo-simple/build.gradle b/jarvis-demo-simple/build.gradle
new file mode 100644
index 0000000..f14146e
--- /dev/null
+++ b/jarvis-demo-simple/build.gradle
@@ -0,0 +1,31 @@
+plugins {
+ id 'com.android.application'
+ id 'org.jetbrains.kotlin.android'
+}
+
+android {
+ compileSdkVersion maximum_supported_android_version
+ buildToolsVersion "32.0.0"
+
+ defaultConfig {
+ minSdkVersion minimum_supported_android_version
+ targetSdkVersion maximum_supported_android_version
+ }
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_11
+ targetCompatibility JavaVersion.VERSION_11
+ }
+
+ kotlinOptions {
+ jvmTarget = JavaVersion.VERSION_11
+ }
+}
+
+dependencies {
+ debugImplementation project(":jarvis-client") // local
+// debugImplementation "com.github.slambang:jarvis:v1.0.0" // latest published
+
+ implementation "io.insert-koin:koin-android:3.1.6"
+ implementation "com.google.android.material:material:1.6.0"
+}
diff --git a/jarvis-demo-simple/proguard-rules.pro b/jarvis-demo-simple/proguard-rules.pro
new file mode 100644
index 0000000..481bb43
--- /dev/null
+++ b/jarvis-demo-simple/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
\ No newline at end of file
diff --git a/jarvis-demo-simple/src/main/AndroidManifest.xml b/jarvis-demo-simple/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..b983c38
--- /dev/null
+++ b/jarvis-demo-simple/src/main/AndroidManifest.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jarvis-demo-simple/src/main/java/com/slambang/jarvis/demo/simple/JarvisConfig.kt b/jarvis-demo-simple/src/main/java/com/slambang/jarvis/demo/simple/JarvisConfig.kt
new file mode 100644
index 0000000..1c12da0
--- /dev/null
+++ b/jarvis-demo-simple/src/main/java/com/slambang/jarvis/demo/simple/JarvisConfig.kt
@@ -0,0 +1,15 @@
+package com.slambang.jarvis.demo.simple
+
+import com.jarvis.client.data.jarvisConfig
+
+const val SOME_STRING_NAME = "Some string (simple demo)"
+
+val jarvisConfig = jarvisConfig {
+
+ withLockAfterPush = false
+
+ withStringField {
+ name = SOME_STRING_NAME
+ value = "Jarvis value"
+ }
+}
diff --git a/jarvis-demo-simple/src/main/java/com/slambang/jarvis/demo/simple/MainActivity.kt b/jarvis-demo-simple/src/main/java/com/slambang/jarvis/demo/simple/MainActivity.kt
new file mode 100644
index 0000000..da33a8e
--- /dev/null
+++ b/jarvis-demo-simple/src/main/java/com/slambang/jarvis/demo/simple/MainActivity.kt
@@ -0,0 +1,34 @@
+package com.slambang.jarvis.demo.simple
+
+import android.os.Bundle
+import android.view.View
+import android.widget.TextView
+import androidx.appcompat.app.AppCompatActivity
+import com.jarvis.client.JarvisClient
+
+/**
+ * Absolute minimal code setup, instantiating an instance of [JarvisClient] to read a string.
+ * See the FileProvider that is declared in the manifest.
+ */
+class MainActivity : AppCompatActivity() {
+
+ private lateinit var jarvis: JarvisClient
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_main)
+
+ /**
+ * Instantiate the [JarvisClient] and push your app's config.
+ * This can be done wherever you like, but the config must be pushed before your
+ * app tries to read any config values.
+ */
+ jarvis = JarvisClient.newInstance(this)
+ jarvis.pushConfigToJarvisApp(jarvisConfig)
+
+ findViewById(R.id.get_value_button).setOnClickListener {
+ findViewById(R.id.value_at_runtime).text =
+ jarvis.getString(SOME_STRING_NAME, "Default value")
+ }
+ }
+}
diff --git a/jarvis-demo-simple/src/main/res/drawable-v24/ic_launcher_foreground.xml b/jarvis-demo-simple/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..2b068d1
--- /dev/null
+++ b/jarvis-demo-simple/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/jarvis-demo-simple/src/main/res/drawable/ic_launcher_background.xml b/jarvis-demo-simple/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..07d5da9
--- /dev/null
+++ b/jarvis-demo-simple/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jarvis-demo-simple/src/main/res/layout/activity_main.xml b/jarvis-demo-simple/src/main/res/layout/activity_main.xml
new file mode 100644
index 0000000..30aee52
--- /dev/null
+++ b/jarvis-demo-simple/src/main/res/layout/activity_main.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
diff --git a/jarvis-demo-simple/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/jarvis-demo-simple/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/jarvis-demo-simple/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/jarvis-demo-simple/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/jarvis-demo-simple/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/jarvis-demo-simple/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/jarvis-demo-simple/src/main/res/mipmap-hdpi/ic_launcher.webp b/jarvis-demo-simple/src/main/res/mipmap-hdpi/ic_launcher.webp
new file mode 100644
index 0000000..c209e78
Binary files /dev/null and b/jarvis-demo-simple/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/jarvis-demo-simple/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/jarvis-demo-simple/src/main/res/mipmap-hdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..b2dfe3d
Binary files /dev/null and b/jarvis-demo-simple/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/jarvis-demo-simple/src/main/res/mipmap-mdpi/ic_launcher.webp b/jarvis-demo-simple/src/main/res/mipmap-mdpi/ic_launcher.webp
new file mode 100644
index 0000000..4f0f1d6
Binary files /dev/null and b/jarvis-demo-simple/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/jarvis-demo-simple/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/jarvis-demo-simple/src/main/res/mipmap-mdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..62b611d
Binary files /dev/null and b/jarvis-demo-simple/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/jarvis-demo-simple/src/main/res/mipmap-xhdpi/ic_launcher.webp b/jarvis-demo-simple/src/main/res/mipmap-xhdpi/ic_launcher.webp
new file mode 100644
index 0000000..948a307
Binary files /dev/null and b/jarvis-demo-simple/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/jarvis-demo-simple/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/jarvis-demo-simple/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..1b9a695
Binary files /dev/null and b/jarvis-demo-simple/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/jarvis-demo-simple/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/jarvis-demo-simple/src/main/res/mipmap-xxhdpi/ic_launcher.webp
new file mode 100644
index 0000000..28d4b77
Binary files /dev/null and b/jarvis-demo-simple/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/jarvis-demo-simple/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/jarvis-demo-simple/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..9287f50
Binary files /dev/null and b/jarvis-demo-simple/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/jarvis-demo-simple/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/jarvis-demo-simple/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
new file mode 100644
index 0000000..aa7d642
Binary files /dev/null and b/jarvis-demo-simple/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/jarvis-demo-simple/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/jarvis-demo-simple/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
new file mode 100644
index 0000000..9126ae3
Binary files /dev/null and b/jarvis-demo-simple/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/jarvis-demo-simple/src/main/res/values/colors.xml b/jarvis-demo-simple/src/main/res/values/colors.xml
new file mode 100644
index 0000000..f8c6127
--- /dev/null
+++ b/jarvis-demo-simple/src/main/res/values/colors.xml
@@ -0,0 +1,10 @@
+
+
+ #FFBB86FC
+ #FF6200EE
+ #FF3700B3
+ #FF03DAC5
+ #FF018786
+ #FF000000
+ #FFFFFFFF
+
\ No newline at end of file
diff --git a/jarvis-demo-simple/src/main/res/values/strings.xml b/jarvis-demo-simple/src/main/res/values/strings.xml
new file mode 100644
index 0000000..8abcf6c
--- /dev/null
+++ b/jarvis-demo-simple/src/main/res/values/strings.xml
@@ -0,0 +1,4 @@
+
+ Jarvis Demo: Simple
+ Read value
+
diff --git a/jarvis-demo-simple/src/main/res/values/themes.xml b/jarvis-demo-simple/src/main/res/values/themes.xml
new file mode 100644
index 0000000..0ff85c2
--- /dev/null
+++ b/jarvis-demo-simple/src/main/res/values/themes.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index 7adfd79..f5e8be9 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1,5 +1,4 @@
include ':jarvis-app'
include ':jarvis-client'
include ':jarvis-demo-advanced'
-
-rootProject.name = "Jarvis"
+include ':jarvis-demo-simple'