From b1c47fdd67987ae3a013f32eaa1a2220834f8bbb Mon Sep 17 00:00:00 2001 From: Kizito Nwose Date: Mon, 27 May 2024 17:05:47 +0200 Subject: [PATCH] Use kotlin dsl --- build.gradle | 31 ------- build.gradle.kts | 15 ++++ .../calendar/buildsrc/Dependencies.kt | 42 ++++++---- compose/build.gradle | 45 ---------- compose/build.gradle.kts | 48 +++++++++++ core/build.gradle | 21 ----- core/build.gradle.kts | 25 ++++++ data/build.gradle | 25 ------ data/build.gradle.kts | 29 +++++++ gradle/wrapper/gradle-wrapper.properties | 4 +- sample/build.gradle | 77 ----------------- sample/build.gradle.kts | 82 +++++++++++++++++++ .../calendar/sample/compose/Utils.kt | 4 +- .../shared/StatusBarColorLifecycleObserver.kt | 1 + .../calendar/sample/view/Example3Fragment.kt | 6 +- settings.gradle | 1 - settings.gradle.kts | 20 +++++ view/build.gradle | 37 --------- view/build.gradle.kts | 40 +++++++++ 19 files changed, 296 insertions(+), 257 deletions(-) delete mode 100644 build.gradle create mode 100644 build.gradle.kts delete mode 100644 compose/build.gradle create mode 100644 compose/build.gradle.kts delete mode 100644 core/build.gradle create mode 100644 core/build.gradle.kts delete mode 100644 data/build.gradle create mode 100644 data/build.gradle.kts delete mode 100644 sample/build.gradle create mode 100644 sample/build.gradle.kts delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts delete mode 100644 view/build.gradle create mode 100644 view/build.gradle.kts diff --git a/build.gradle b/build.gradle deleted file mode 100644 index f60bcc51..00000000 --- a/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -import com.kizitonwose.calendar.buildsrc.Plugins - -apply plugin: 'com.github.ben-manes.versions' - -buildscript { - repositories { - google() - gradlePluginPortal() - mavenCentral() - } - dependencies { - classpath Plugins.android - classpath Plugins.kotlin - classpath Plugins.kotlinter - classpath Plugins.versions - classpath Plugins.mavenPublish - } -} - -allprojects { - repositories { - google() - mavenCentral() - } - - apply plugin: 'org.jmailen.kotlinter' -} - -task clean(type: Delete) { - delete rootProject.buildDir -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 00000000..3574324b --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,15 @@ +import com.kizitonwose.calendar.buildsrc.Plugins + +plugins { + with(com.kizitonwose.calendar.buildsrc.Plugins) { + applyRootPlugins() + } +} + +allprojects { + apply(plugin = Plugins.kotlinter) +} + +tasks.register("clean").configure { + delete(rootProject.layout.buildDirectory) +} diff --git a/buildSrc/src/main/java/com/kizitonwose/calendar/buildsrc/Dependencies.kt b/buildSrc/src/main/java/com/kizitonwose/calendar/buildsrc/Dependencies.kt index bb65dc69..bc1092b6 100644 --- a/buildSrc/src/main/java/com/kizitonwose/calendar/buildsrc/Dependencies.kt +++ b/buildSrc/src/main/java/com/kizitonwose/calendar/buildsrc/Dependencies.kt @@ -4,6 +4,7 @@ package com.kizitonwose.calendar.buildsrc import org.gradle.api.JavaVersion import org.gradle.jvm.toolchain.JavaLanguageVersion +import org.gradle.kotlin.dsl.PluginDependenciesSpecScope import kotlin.math.max object Config { @@ -12,28 +13,39 @@ object Config { } object Android { - const val minSdkLibraryView = 15 - const val minSdkLibraryCompose = 21 - val minSdkSample = max(minSdkLibraryView, minSdkLibraryCompose) - const val targetSdk = 33 + const val minSdkViewLibrary = 15 + const val minSdkComposeLibrary = 21 + val minSdkSampleApp = max(minSdkViewLibrary, minSdkComposeLibrary) + const val targetSdk = 34 const val compileSdk = 34 // See compose/kotlin version mapping // https://developer.android.com/jetpack/androidx/releases/compose-kotlin - const val composeCompiler = "1.5.9" + const val composeCompiler = "1.5.14" } object Plugins { - const val android = "com.android.tools.build:gradle:8.2.2" - const val kotlin = Kotlin.gradlePlugin - const val kotlinter = "org.jmailen.gradle:kotlinter-gradle:4.2.0" - const val versions = "com.github.ben-manes:gradle-versions-plugin:0.51.0" - const val mavenPublish = "com.vanniktech:gradle-maven-publish-plugin:0.27.0" + private const val agpVersion = "8.4.0" + const val androidApp = "com.android.application" + const val androidLibrary = "com.android.library" + const val kotlinJvm = "org.jetbrains.kotlin.jvm" + const val kotlinAndroid = "org.jetbrains.kotlin.android" + const val kotlinter = "org.jmailen.kotlinter" + const val mavenPublish = "com.vanniktech.maven.publish" + const val versionCheck = "com.github.ben-manes.versions" + + fun PluginDependenciesSpecScope.applyRootPlugins() { + id(androidApp).version(agpVersion).apply(false) + id(androidLibrary).version(agpVersion).apply(false) + id(kotlinAndroid).version(Kotlin.version).apply(false) + id(kotlinter).version("4.3.0").apply(false) + id(mavenPublish).version("0.28.0").apply(false) + id(versionCheck).version("0.51.0").apply(true) + } } object Kotlin { - private const val version = "1.9.22" - const val gradlePlugin = "org.jetbrains.kotlin:kotlin-gradle-plugin:$version" + internal const val version = "1.9.24" const val stdLib = "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$version" } @@ -49,11 +61,11 @@ object Libs { object View { const val legacySupport = "androidx.legacy:legacy-support-v4:1.0.0" const val appCompat = "androidx.appcompat:appcompat:1.6.1" - const val coreKtx = "androidx.core:core-ktx:1.12.0" + const val coreKtx = "androidx.core:core-ktx:1.13.1" const val constraintLayout = "androidx.constraintlayout:constraintlayout:2.1.4" const val cardView = "androidx.cardview:cardview:1.0.0" const val recyclerView = "androidx.recyclerview:recyclerview:1.3.2" - const val material = "com.google.android.material:material:1.9.0" + const val material = "com.google.android.material:material:1.12.0" object Test { private const val espressoVersion = "3.5.1" @@ -72,7 +84,7 @@ object Libs { const val tooling = "androidx.compose.ui:ui-tooling:$composeVersion" const val runtime = "androidx.compose.runtime:runtime:$composeVersion" const val material = "androidx.compose.material:material:$composeVersion" - const val activity = "androidx.activity:activity-compose:1.8.2" + const val activity = "androidx.activity:activity-compose:1.9.0" const val navigation = "androidx.navigation:navigation-compose:2.7.7" object Test { diff --git a/compose/build.gradle b/compose/build.gradle deleted file mode 100644 index e87226ec..00000000 --- a/compose/build.gradle +++ /dev/null @@ -1,45 +0,0 @@ -import com.kizitonwose.calendar.buildsrc.Android -import com.kizitonwose.calendar.buildsrc.Config -import com.kizitonwose.calendar.buildsrc.Kotlin -import com.kizitonwose.calendar.buildsrc.Libs - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'com.vanniktech.maven.publish' - -android { - compileSdk Android.compileSdk - namespace 'com.kizitonwose.calendar.compose' - defaultConfig { - minSdkVersion Android.minSdkLibraryCompose - targetSdkVersion Android.targetSdk - } - java { - toolchain { - languageVersion = Config.compatibleJavaLanguageVersion - } - } - kotlin { - jvmToolchain { - languageVersion = Config.compatibleJavaLanguageVersion - } - } - buildFeatures { - compose true - } - composeOptions { - kotlinCompilerExtensionVersion Android.composeCompiler - } -} - -dependencies { - api project(':core') - implementation project(':data') - implementation Kotlin.stdLib - - implementation Libs.Compose.ui - implementation Libs.Compose.tooling - implementation Libs.Compose.foundation - - testImplementation Libs.Core.Test.junit -} diff --git a/compose/build.gradle.kts b/compose/build.gradle.kts new file mode 100644 index 00000000..d69ad895 --- /dev/null +++ b/compose/build.gradle.kts @@ -0,0 +1,48 @@ +import com.kizitonwose.calendar.buildsrc.Android +import com.kizitonwose.calendar.buildsrc.Config +import com.kizitonwose.calendar.buildsrc.Kotlin +import com.kizitonwose.calendar.buildsrc.Libs + +plugins { + with(com.kizitonwose.calendar.buildsrc.Plugins) { + id(androidLibrary) + id(kotlinAndroid) + id(mavenPublish) + } +} + +android { + compileSdk = Android.compileSdk + namespace = "com.kizitonwose.calendar.compose" + defaultConfig { + minSdk = Android.minSdkComposeLibrary + } + java { + toolchain { + languageVersion.set(Config.compatibleJavaLanguageVersion) + } + } + kotlin { + jvmToolchain { + languageVersion.set(Config.compatibleJavaLanguageVersion) + } + } + buildFeatures { + compose = true + } + composeOptions { + kotlinCompilerExtensionVersion = Android.composeCompiler + } +} + +dependencies { + api(project(":core")) + implementation(project(":data")) + implementation(Kotlin.stdLib) + + implementation(Libs.Compose.ui) + implementation(Libs.Compose.tooling) + implementation(Libs.Compose.foundation) + + testImplementation(Libs.Core.Test.junit) +} diff --git a/core/build.gradle b/core/build.gradle deleted file mode 100644 index 76651cde..00000000 --- a/core/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -import com.kizitonwose.calendar.buildsrc.Config -import com.kizitonwose.calendar.buildsrc.Libs - -apply plugin: 'kotlin' -apply plugin: 'com.vanniktech.maven.publish' - -java { - toolchain { - languageVersion = Config.compatibleJavaLanguageVersion - } -} - -kotlin { - jvmToolchain { - languageVersion = Config.compatibleJavaLanguageVersion - } -} - -dependencies { - implementation Libs.Compose.runtime // Only needed for @Immutable annotation. -} diff --git a/core/build.gradle.kts b/core/build.gradle.kts new file mode 100644 index 00000000..daf1333c --- /dev/null +++ b/core/build.gradle.kts @@ -0,0 +1,25 @@ +import com.kizitonwose.calendar.buildsrc.Config +import com.kizitonwose.calendar.buildsrc.Libs + +plugins { + with(com.kizitonwose.calendar.buildsrc.Plugins) { + id(kotlinJvm) + id(mavenPublish) + } +} + +java { + toolchain { + languageVersion.set(Config.compatibleJavaLanguageVersion) + } +} + +kotlin { + jvmToolchain { + languageVersion.set(Config.compatibleJavaLanguageVersion) + } +} + +dependencies { + implementation(Libs.Compose.runtime) // Only needed for @Immutable annotation. +} diff --git a/data/build.gradle b/data/build.gradle deleted file mode 100644 index de1a61b5..00000000 --- a/data/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -import com.kizitonwose.calendar.buildsrc.Config -import com.kizitonwose.calendar.buildsrc.Kotlin -import com.kizitonwose.calendar.buildsrc.Libs - -apply plugin: 'kotlin' -apply plugin: 'com.vanniktech.maven.publish' - -java { - toolchain { - languageVersion = Config.compatibleJavaLanguageVersion - } -} - -kotlin { - jvmToolchain { - languageVersion = Config.compatibleJavaLanguageVersion - } -} - -dependencies { - implementation project(':core') - implementation Kotlin.stdLib - - testImplementation Libs.Core.Test.junit -} diff --git a/data/build.gradle.kts b/data/build.gradle.kts new file mode 100644 index 00000000..ad18c0cb --- /dev/null +++ b/data/build.gradle.kts @@ -0,0 +1,29 @@ +import com.kizitonwose.calendar.buildsrc.Config +import com.kizitonwose.calendar.buildsrc.Kotlin +import com.kizitonwose.calendar.buildsrc.Libs + +plugins { + with(com.kizitonwose.calendar.buildsrc.Plugins) { + id(kotlinJvm) + id(mavenPublish) + } +} + +java { + toolchain { + languageVersion.set(Config.compatibleJavaLanguageVersion) + } +} + +kotlin { + jvmToolchain { + languageVersion.set(Config.compatibleJavaLanguageVersion) + } +} + +dependencies { + implementation(project(":core")) + implementation(Kotlin.stdLib) + + testImplementation(Libs.Core.Test.junit) +} diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a9bae233..fb5d56ba 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Sun Feb 11 17:28:19 CET 2024 +#Mon May 27 16:10:41 CEST 2024 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/sample/build.gradle b/sample/build.gradle deleted file mode 100644 index 091d632c..00000000 --- a/sample/build.gradle +++ /dev/null @@ -1,77 +0,0 @@ -import com.kizitonwose.calendar.buildsrc.Android -import com.kizitonwose.calendar.buildsrc.Config -import com.kizitonwose.calendar.buildsrc.Kotlin -import com.kizitonwose.calendar.buildsrc.Libs - -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' - -android { - compileSdk Android.compileSdk - namespace 'com.kizitonwose.calendar.sample' - defaultConfig { - applicationId "com.kizitonwose.calendar.sample" - minSdkVersion Android.minSdkSample - targetSdkVersion Android.targetSdk - versionCode 1 - versionName "1.0" - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - buildFeatures { - viewBinding = true - compose = true - } - buildTypes { - release { - minifyEnabled false - } - } - java { - toolchain { - languageVersion = Config.compatibleJavaLanguageVersion - } - } - kotlin { - jvmToolchain { - languageVersion = Config.compatibleJavaLanguageVersion - } - } - compileOptions { - coreLibraryDesugaringEnabled true - } - composeOptions { - kotlinCompilerExtensionVersion Android.composeCompiler - } -} - -dependencies { - implementation project(':view') - implementation project(':compose') - coreLibraryDesugaring Libs.Core.deSugar - implementation Kotlin.stdLib - - implementation Libs.View.legacySupport - implementation Libs.View.appCompat - implementation Libs.View.coreKtx - implementation Libs.View.constraintLayout - implementation Libs.View.cardView - implementation Libs.View.material - - implementation Libs.Compose.ui - implementation Libs.Compose.tooling - implementation Libs.Compose.foundation - implementation Libs.Compose.material - implementation Libs.Compose.activity - implementation Libs.Compose.navigation - - testImplementation Libs.Core.Test.junit - - androidTestImplementation Libs.View.Test.espressoCore - androidTestImplementation Libs.View.Test.espressoContrib // RecyclerView actions. - androidTestImplementation Libs.View.Test.runner - androidTestImplementation Libs.View.Test.rules - androidTestImplementation Libs.View.Test.extJunit - - androidTestImplementation Libs.Compose.Test.uiJunit - debugImplementation Libs.Compose.Test.uiManifest // Compose test runner activity -} diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts new file mode 100644 index 00000000..55cd7389 --- /dev/null +++ b/sample/build.gradle.kts @@ -0,0 +1,82 @@ + +import com.kizitonwose.calendar.buildsrc.Android +import com.kizitonwose.calendar.buildsrc.Config +import com.kizitonwose.calendar.buildsrc.Kotlin +import com.kizitonwose.calendar.buildsrc.Libs + +plugins { + with(com.kizitonwose.calendar.buildsrc.Plugins) { + id(androidApp) + id(kotlinAndroid) + } +} + +android { + compileSdk = Android.compileSdk + namespace = "com.kizitonwose.calendar.sample" + defaultConfig { + applicationId = "com.kizitonwose.calendar.sample" + minSdk = Android.minSdkSampleApp + targetSdk = Android.targetSdk + versionCode = 1 + versionName = "1.0" + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + buildFeatures { + viewBinding = true + compose = true + } + buildTypes { + named("release") { + isMinifyEnabled = false + } + } + java { + toolchain { + languageVersion.set(Config.compatibleJavaLanguageVersion) + } + } + kotlin { + jvmToolchain { + languageVersion.set(Config.compatibleJavaLanguageVersion) + } + } + compileOptions { + isCoreLibraryDesugaringEnabled = true + } + composeOptions { + kotlinCompilerExtensionVersion = Android.composeCompiler + } +} + +dependencies { + implementation(project(":view")) + implementation(project(":compose")) + coreLibraryDesugaring(Libs.Core.deSugar) + implementation(Kotlin.stdLib) + + implementation(Libs.View.legacySupport) + implementation(Libs.View.appCompat) + implementation(Libs.View.coreKtx) + implementation(Libs.View.constraintLayout) + implementation(Libs.View.cardView) + implementation(Libs.View.material) + + implementation(Libs.Compose.ui) + implementation(Libs.Compose.tooling) + implementation(Libs.Compose.foundation) + implementation(Libs.Compose.material) + implementation(Libs.Compose.activity) + implementation(Libs.Compose.navigation) + + testImplementation(Libs.Core.Test.junit) + + androidTestImplementation(Libs.View.Test.espressoCore) + androidTestImplementation(Libs.View.Test.espressoContrib) // RecyclerView actions. + androidTestImplementation(Libs.View.Test.runner) + androidTestImplementation(Libs.View.Test.rules) + androidTestImplementation(Libs.View.Test.extJunit) + + androidTestImplementation(Libs.Compose.Test.uiJunit) + debugImplementation(Libs.Compose.Test.uiManifest) // Compose test runner activity +} diff --git a/sample/src/main/java/com/kizitonwose/calendar/sample/compose/Utils.kt b/sample/src/main/java/com/kizitonwose/calendar/sample/compose/Utils.kt index 517e9c44..97528f45 100644 --- a/sample/src/main/java/com/kizitonwose/calendar/sample/compose/Utils.kt +++ b/sample/src/main/java/com/kizitonwose/calendar/sample/compose/Utils.kt @@ -10,7 +10,7 @@ import androidx.compose.foundation.layout.padding import androidx.compose.foundation.shape.CircleShape import androidx.compose.material.Icon import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowBack +import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect import androidx.compose.runtime.mutableStateOf @@ -80,7 +80,7 @@ fun NavigationIcon(onBackClick: () -> Unit) { Icon( tint = Color.White, modifier = Modifier.align(Alignment.Center), - imageVector = Icons.Default.ArrowBack, + imageVector = Icons.AutoMirrored.Filled.ArrowBack, contentDescription = "Back", ) } diff --git a/sample/src/main/java/com/kizitonwose/calendar/sample/shared/StatusBarColorLifecycleObserver.kt b/sample/src/main/java/com/kizitonwose/calendar/sample/shared/StatusBarColorLifecycleObserver.kt index 9668ce0e..18c1324a 100644 --- a/sample/src/main/java/com/kizitonwose/calendar/sample/shared/StatusBarColorLifecycleObserver.kt +++ b/sample/src/main/java/com/kizitonwose/calendar/sample/shared/StatusBarColorLifecycleObserver.kt @@ -11,6 +11,7 @@ import com.kizitonwose.calendar.sample.R import com.kizitonwose.calendar.sample.view.getColorCompat import java.lang.ref.WeakReference +@Suppress("DEPRECATION") class StatusBarColorLifecycleObserver( activity: Activity, @ColorInt private val color: Int, diff --git a/sample/src/main/java/com/kizitonwose/calendar/sample/view/Example3Fragment.kt b/sample/src/main/java/com/kizitonwose/calendar/sample/view/Example3Fragment.kt index 2c70aead..69b04004 100644 --- a/sample/src/main/java/com/kizitonwose/calendar/sample/view/Example3Fragment.kt +++ b/sample/src/main/java/com/kizitonwose/calendar/sample/view/Example3Fragment.kt @@ -1,5 +1,6 @@ package com.kizitonwose.calendar.sample.view +import android.annotation.SuppressLint import android.os.Bundle import android.view.View import android.view.ViewGroup @@ -96,7 +97,7 @@ class Example3Fragment : BaseFragment(R.layout.example_3_fragment), HasBackButto } .setNegativeButton(R.string.close, null) .create() - .apply { + .apply @Suppress("DEPRECATION") { setOnShowListener { // Show the keyboard editText.requestFocus() @@ -189,6 +190,7 @@ class Example3Fragment : BaseFragment(R.layout.example_3_fragment), HasBackButto updateAdapterForDate(date) } + @SuppressLint("NotifyDataSetChanged") private fun updateAdapterForDate(date: LocalDate) { eventsAdapter.apply { events.clear() @@ -242,11 +244,13 @@ class Example3Fragment : BaseFragment(R.layout.example_3_fragment), HasBackButto textView.setBackgroundResource(R.drawable.example_3_today_bg) dotView.makeInVisible() } + selectedDate -> { textView.setTextColorRes(R.color.example_3_blue) textView.setBackgroundResource(R.drawable.example_3_selected_bg) dotView.makeInVisible() } + else -> { textView.setTextColorRes(R.color.example_3_black) textView.background = null diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index edb9d0b3..00000000 --- a/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include ':core', ':data', ':view', ':compose', ':sample' diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000..eb300931 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,20 @@ +pluginManagement { + repositories { + google() + gradlePluginPortal() + mavenCentral() + } +} +@Suppress("UnstableApiUsage") +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} +include(":core") +include(":data") +include(":view") +include(":compose") +include(":sample") diff --git a/view/build.gradle b/view/build.gradle deleted file mode 100644 index 7e986370..00000000 --- a/view/build.gradle +++ /dev/null @@ -1,37 +0,0 @@ -import com.kizitonwose.calendar.buildsrc.Android -import com.kizitonwose.calendar.buildsrc.Config -import com.kizitonwose.calendar.buildsrc.Kotlin -import com.kizitonwose.calendar.buildsrc.Libs - -apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' -apply plugin: 'com.vanniktech.maven.publish' - -android { - compileSdk Android.compileSdk - namespace 'com.kizitonwose.calendar.view' - defaultConfig { - minSdkVersion Android.minSdkLibraryView - targetSdkVersion Android.targetSdk - } - java { - toolchain { - languageVersion = Config.compatibleJavaLanguageVersion - } - } - kotlin { - jvmToolchain { - languageVersion = Config.compatibleJavaLanguageVersion - } - } -} - -dependencies { - api project(':core') - implementation project(':data') - implementation Kotlin.stdLib - implementation Libs.View.coreKtx - - // Expose RecyclerView which is CalendarView's superclass. - api Libs.View.recyclerView -} diff --git a/view/build.gradle.kts b/view/build.gradle.kts new file mode 100644 index 00000000..67d51511 --- /dev/null +++ b/view/build.gradle.kts @@ -0,0 +1,40 @@ +import com.kizitonwose.calendar.buildsrc.Android +import com.kizitonwose.calendar.buildsrc.Config +import com.kizitonwose.calendar.buildsrc.Kotlin +import com.kizitonwose.calendar.buildsrc.Libs + +plugins { + with(com.kizitonwose.calendar.buildsrc.Plugins) { + id(androidLibrary) + id(kotlinAndroid) + id(mavenPublish) + } +} + +android { + compileSdk = Android.compileSdk + namespace = "com.kizitonwose.calendar.view" + defaultConfig { + minSdk = Android.minSdkViewLibrary + } + java { + toolchain { + languageVersion.set(Config.compatibleJavaLanguageVersion) + } + } + kotlin { + jvmToolchain { + languageVersion.set(Config.compatibleJavaLanguageVersion) + } + } +} + +dependencies { + api(project(":core")) + implementation(project(":data")) + implementation(Kotlin.stdLib) + implementation(Libs.View.coreKtx) + + // Expose RecyclerView which is CalendarView"s superclass. + api(Libs.View.recyclerView) +}