diff --git a/README.md b/README.md
index 017457a..99925ca 100644
--- a/README.md
+++ b/README.md
@@ -49,7 +49,7 @@ baz: true
-#### Check out the [example app for Kyaml](/example-kyaml/)!
+### Check out the [example app for Kyaml](/example-kyaml/)!
@@ -233,24 +233,33 @@ Usage is simply calling [Kyaml()](#usage--examples) passing up to four arguments
## Installation
-### Install with AAR and gradle (Local)
-1) Download the latest [kyaml.aar](kyaml.aar).
-2) Move `kyaml.aar` to your project's `libs` directory (Example: `YourProject/app/libs/`).
-3) In your `build.gradle`, add only one of the following to your `dependencies { }`:
+### Install with JitPack
+[![](https://jitpack.io/v/Digidemic/kyaml.svg)](https://jitpack.io/#Digidemic/kyaml)
+1) Add JitPack to your project's root `build.gradle` at the end of `repositories`:
- ```groovy
- // adds only kyaml.aar
- implementation fileTree(dir: "libs", include: ["kyaml.aar"])
+ dependencyResolutionManagement {
+ repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
+ repositories {
+ mavenCentral()
+ maven { url 'https://jitpack.io' }
+ }
+ }
+ ```
+2) In the `build.gradle` of the module(s) you wish to use Kyaml with, add the following to `dependencies`:
+- ```groovy
+ dependencies {
+ // Required: Installs the .aar without any documentation.
+ implementation 'com.github.digidemic:kyaml:1.1.0'
+
+ // Optional: Displays documentation while writing coding.
+ implementation 'com.github.digidemic:kyaml:1.1.0:javadoc'
- // OR
-
- // adds all .aar files in your libs directory.
- implementation fileTree(dir: "libs", include: ["*.aar"])
+ // Optional: Displays documentation (more comprehensive than javadoc in some cases) and uncompiled code when stepping into library.
+ implementation 'com.github.digidemic:kyaml:1.1.0:sources'
+ }
```
-4) [Sync gradle](https://www.delasign.com/blog/how-to-sync-an-android-project-with-its-gradle-files-in-android-studio/) successfully.
-5) Done! Your Android project is now ready to use Kyaml. Go to [Usage / Examples](#usage--examples) or [Syntax](#syntax) for Kyaml usage!
-
-### Install with gradle (Remote)
->Coming soon!
+3) [Sync gradle](https://www.delasign.com/blog/how-to-sync-an-android-project-with-its-gradle-files-in-android-studio/) successfully.
+4) Done! Your Android project is now ready to use Kyaml. Go to [Examples](#usage--examples) or [Syntax](#syntax) for Kyaml usage!
diff --git a/build.gradle b/build.gradle
index 4314313..ace7054 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,3 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
- id 'com.android.application' version '8.0.2' apply false
- id 'com.android.library' version '8.0.2' apply false
- id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
}
\ No newline at end of file
diff --git a/example-kyaml/build.gradle b/example-kyaml/build.gradle
index 6d4799e..a2df7bf 100644
--- a/example-kyaml/build.gradle
+++ b/example-kyaml/build.gradle
@@ -1,6 +1,6 @@
plugins {
- id 'com.android.application'
- id 'org.jetbrains.kotlin.android'
+ id 'com.android.application'version '8.0.2'
+ id 'org.jetbrains.kotlin.android' version '1.7.20'
}
android {
diff --git a/example-kyaml/src/main/java/com/digidemic/kyaml/MainActivity.kt b/example-kyaml/src/main/java/com/digidemic/kyaml/MainActivity.kt
index 017d701..5fc443d 100644
--- a/example-kyaml/src/main/java/com/digidemic/kyaml/MainActivity.kt
+++ b/example-kyaml/src/main/java/com/digidemic/kyaml/MainActivity.kt
@@ -1,5 +1,5 @@
/**
- * Kyaml v1.0.0 - https://github.com/Digidemic/Kyaml
+ * Kyaml v1.1.0 - https://github.com/Digidemic/kyaml
* (c) 2024 DIGIDEMIC, LLC - All Rights Reserved
* Kyaml developed by Adam Steinberg of DIGIDEMIC, LLC
* License: Apache License 2.0
diff --git a/jitpack.yml b/jitpack.yml
new file mode 100644
index 0000000..1e41e00
--- /dev/null
+++ b/jitpack.yml
@@ -0,0 +1,2 @@
+jdk:
+ - openjdk17
\ No newline at end of file
diff --git a/kyaml.aar b/kyaml.aar
deleted file mode 100644
index da0c7c8..0000000
Binary files a/kyaml.aar and /dev/null differ
diff --git a/kyaml/build.gradle b/kyaml/build.gradle
index e8931b2..29446f7 100644
--- a/kyaml/build.gradle
+++ b/kyaml/build.gradle
@@ -1,6 +1,7 @@
plugins {
- id 'com.android.library'
- id 'org.jetbrains.kotlin.android'
+ id 'com.android.library' version '8.0.2'
+ id 'org.jetbrains.kotlin.android' version '1.6.20'
+ id 'maven-publish'
}
android {
@@ -8,8 +9,8 @@ android {
compileSdk 33
defaultConfig {
- minSdk 16
- targetSdk 33
+ minSdk 4
+ targetSdk 34
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
@@ -28,6 +29,12 @@ android {
kotlinOptions {
jvmTarget = '1.8'
}
+
+ publishing {
+ singleVariant("release") {
+ withJavadocJar()
+ }
+ }
}
dependencies {
@@ -37,4 +44,43 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
testImplementation "io.mockk:mockk-android:1.13.5"
testImplementation "io.mockk:mockk-agent:1.13.5"
+}
+
+afterEvaluate {
+ android.libraryVariants.each {variant ->
+ publishing.publications.create(variant.name, MavenPublication){
+ from components.findByName(variant.name)
+
+ groupId = 'com.github.kyaml'
+ artifactId = "kyaml"
+ version = '1.1.0'
+
+ pom {
+ name = 'Kyaml'
+ description = 'A simple, flexible, and forgiving YAML parser for Android'
+ url = 'https://github.com/Digidemic/kyaml'
+
+ licenses {
+ license {
+ name = 'The Apache License, Version 2.0'
+ url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
+ }
+ }
+
+ developers {
+ developer {
+ id = 'Digidemic'
+ name = 'Adam Steinberg'
+ email = 'digidemic@gmail.com'
+ }
+ }
+
+ scm {
+ connection = 'scm:git://github.com/Digidemic/kyaml.git'
+ developerConnection = 'scm:git://github.com/Digidemic/kyaml.git'
+ url = 'git://github.com/Digidemic/kyaml.git'
+ }
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/kyaml/src/main/java/com/digidemic/kyaml/Kyaml.kt b/kyaml/src/main/java/com/digidemic/kyaml/Kyaml.kt
index 4d3da63..cd8efa8 100644
--- a/kyaml/src/main/java/com/digidemic/kyaml/Kyaml.kt
+++ b/kyaml/src/main/java/com/digidemic/kyaml/Kyaml.kt
@@ -1,5 +1,5 @@
/**
- * Kyaml v1.0.0 - https://github.com/Digidemic/Kyaml
+ * Kyaml v1.1.0 - https://github.com/Digidemic/kyaml
* (c) 2024 DIGIDEMIC, LLC - All Rights Reserved
* Kyaml developed by Adam Steinberg of DIGIDEMIC, LLC
* License: Apache License 2.0
@@ -538,7 +538,6 @@ class Kyaml {
* 6) List("null", "two", "three") -> SequenceType(ValueType.STRING, true)
* 7) List("1", "two", "true") -> SequenceType(ValueType.STRING, false)
*/
-
@VisibleForTesting(otherwise = VisibleForTesting.PRIVATE)
@Suppress("KotlinConstantConditions")
internal fun getSequenceType(list: List): SequenceType {