diff --git a/README.md b/README.md index db77e17..1139ca2 100644 --- a/README.md +++ b/README.md @@ -241,7 +241,6 @@ ColorfulIconSlider( modifier = Modifier.size(40.dp) ) } -} ``` ## Gradle Setup diff --git a/build.gradle b/build.gradle index ef40f3e..e575a62 100644 --- a/build.gradle +++ b/build.gradle @@ -1,14 +1,10 @@ buildscript { ext { - compose_version = '1.4.0-alpha05' + compose_version = '1.4.1' } -}// Top-level build file where you can add configuration options common to all sub-projects/modules. -plugins { - id 'com.android.application' version '7.2.2' apply false - id 'com.android.library' version '7.2.2' apply false - id 'org.jetbrains.kotlin.android' version '1.8.0' apply false } - -task clean(type: Delete) { - delete rootProject.buildDir +plugins { + id 'com.android.application' version '8.0.0-rc01' apply false + id 'com.android.library' version '8.0.0-rc01' apply false + id 'org.jetbrains.kotlin.android' version '1.8.10' apply false } \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index cd0519b..ef4a1eb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,23 +1,8 @@ -# Project-wide Gradle settings. -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. +kotlin.code.style=official + org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true -# AndroidX package structure to make it clearer which packages are bundled with the -# Android operating system, and which are packaged with your app"s APK -# https://developer.android.com/topic/libraries/support-library/androidx-rn +org.gradle.parallel=true +org.gradle.caching=true + android.useAndroidX=true -# Kotlin code style for this project: "official" or "obsolete": -kotlin.code.style=official -# Enables namespacing of each library's R class so that its R class includes only the -# resources declared in the library itself and none from the library's dependencies, -# thereby reducing the size of the R class for that library android.nonTransitiveRClass=true \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9316be7..bb402e7 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Mon Mar 14 14:21:27 TRT 2022 +#Sat May 21 20:06:04 TRT 2022 distributionBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME 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/slider/build.gradle b/slider/build.gradle index 49bc5fd..1bf781d 100644 --- a/slider/build.gradle +++ b/slider/build.gradle @@ -1,19 +1,15 @@ plugins { id 'com.android.library' id 'org.jetbrains.kotlin.android' + id 'maven-publish' } android { compileSdk 33 - + namespace 'com.smarttoolfactory.slider' defaultConfig { minSdk 21 - targetSdk 33 - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - consumerProguardFiles "consumer-rules.pro" } - buildTypes { release { minifyEnabled false @@ -21,42 +17,45 @@ android { } } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } - kotlinOptions { - jvmTarget = '1.8' + kotlin { + jvmToolchain(17) } buildFeatures { compose true } composeOptions { - kotlinCompilerExtensionVersion = "1.4.0" + kotlinCompilerExtensionVersion = "1.4.4" } - packagingOptions { resources { excludes += '/META-INF/{AL2.0,LGPL2.1}' } } - namespace 'com.smarttoolfactory.slider' } -dependencies { +afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release - implementation 'androidx.core:core-ktx:1.8.0' + groupId = 'com.smarttoolfactory' + artifactId = 'slider' + version = '0.0.1' + } + } + } +} - implementation 'com.github.SmartToolFactory:Compose-Extended-Gestures:2.0.0' +dependencies { + implementation 'androidx.core:core-ktx:1.10.0' // Jetpack Compose implementation "androidx.compose.ui:ui:$compose_version" implementation "androidx.compose.material:material:$compose_version" implementation "androidx.compose.material:material-icons-extended:$compose_version" implementation "androidx.compose.runtime:runtime:$compose_version" - - testImplementation 'junit:junit:4.13.2' - androidTestImplementation 'androidx.test.ext:junit:1.1.3' - androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' - androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version" - debugImplementation "androidx.compose.ui:ui-tooling:$compose_version" } \ No newline at end of file diff --git a/slider/consumer-rules.pro b/slider/consumer-rules.pro deleted file mode 100644 index e69de29..0000000 diff --git a/slider/src/androidTest/java/com/smarttoolfactory/slider/ExampleInstrumentedTest.kt b/slider/src/androidTest/java/com/smarttoolfactory/slider/ExampleInstrumentedTest.kt deleted file mode 100644 index fb78e94..0000000 --- a/slider/src/androidTest/java/com/smarttoolfactory/slider/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,24 +0,0 @@ -package com.smarttoolfactory.slider - -import androidx.test.platform.app.InstrumentationRegistry -import androidx.test.ext.junit.runners.AndroidJUnit4 - -import org.junit.Test -import org.junit.runner.RunWith - -import org.junit.Assert.* - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("com.smarttoolfactory.slider.test", appContext.packageName) - } -} \ No newline at end of file diff --git a/slider/src/main/AndroidManifest.xml b/slider/src/main/AndroidManifest.xml deleted file mode 100644 index 44008a4..0000000 --- a/slider/src/main/AndroidManifest.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/slider/src/test/java/com/smarttoolfactory/slider/ExampleUnitTest.kt b/slider/src/test/java/com/smarttoolfactory/slider/ExampleUnitTest.kt deleted file mode 100644 index 67aaae3..0000000 --- a/slider/src/test/java/com/smarttoolfactory/slider/ExampleUnitTest.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.smarttoolfactory.slider - -import org.junit.Test - -import org.junit.Assert.* - -/** - * Example local unit test, which will execute on the development machine (host). - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -class ExampleUnitTest { - @Test - fun addition_isCorrect() { - assertEquals(4, 2 + 2) - } -} \ No newline at end of file