Skip to content

Commit

Permalink
Merge pull request #70 from Nenoeldeeb/main
Browse files Browse the repository at this point in the history
Update the library and its dependencies & added SwitchState handler.
  • Loading branch information
joykangangi authored Sep 22, 2024
2 parents 9115d66 + cde88ee commit e013588
Show file tree
Hide file tree
Showing 22 changed files with 580 additions and 227 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 12
uses: actions/setup-java@v1
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 12
java-version: 17
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew

Expand All @@ -24,4 +25,4 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ./form-builder/build/dokka/html
FOLDER: ./form-builder/build/dokka/html
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ support for a form state so the library is used to provide a custom implementati

In the root `build.gradle` file add the following:

```groovy
```kotlin
repositories {
maven { url "https://jitpack.io" }
maven { url = uri("https://jitpack.io") }
}
```

Then add the following to your module's `build.gradle`

```groovy
```kotlin
dependencies {
implementation 'com.github.jkuatdsc:form-builder:${version}'
implementation("com.github.jkuatdsc:form-builder:${version}")
}
```

Expand Down
19 changes: 0 additions & 19 deletions build.gradle

This file was deleted.

7 changes: 7 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
plugins {
alias(libs.plugins.android.library) apply false
alias(libs.plugins.android.application) apply false
alias(libs.plugins.jetbrains.kotlin.android) apply false
alias(libs.plugins.jetbrains.dokka) apply false
alias(libs.plugins.jetbrains.compose.compiler) apply false
}
64 changes: 0 additions & 64 deletions example/build.gradle

This file was deleted.

71 changes: 71 additions & 0 deletions example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.jetbrains.compose.compiler)
}

android {
compileSdk = libs.versions.compileSdk.get().toInt()

defaultConfig {
applicationId = "com.dsc.formbuilder"
minSdk = libs.versions.minSdk.get().toInt()
targetSdk = libs.versions.targetSdk.get().toInt()
versionCode = libs.versions.appVersionCode.get().toInt()
versionName = libs.versions.appVersionName.get()

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
getByName("release") {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility(libs.versions.jvmTarget.get())
targetCompatibility(libs.versions.jvmTarget.get())
isCoreLibraryDesugaringEnabled = true
}

kotlin {
jvmToolchain(libs.versions.jvmTarget.get().toInt())
}
buildFeatures {
compose = true
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
namespace = "com.dsc.formbuilder"
}

dependencies {

implementation(project(":form-builder"))
// For using modern java 8 classes with older versions of android
coreLibraryDesugaring(libs.core.java8)

implementation(platform(libs.androidx.compose.bom))
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.androidx.activity.compose)
implementation(libs.android.material)
implementation(libs.androidx.lifecycle.runtime)

implementation(libs.androidx.compose.ui)
implementation(libs.androidx.compose.material)
implementation(libs.androidx.compose.animation)
implementation(libs.androidx.compose.ui.tooling.preview)

debugImplementation(libs.androidx.compose.ui.tooling)

implementation(libs.androidx.compose.material3)
implementation(libs.androidx.compose.material3.window.size)
}
2 changes: 1 addition & 1 deletion example/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# proguardFiles setting in build.gradle.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand Down
3 changes: 1 addition & 2 deletions example/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.dsc.formbuilder">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
Loading

0 comments on commit e013588

Please sign in to comment.