diff --git a/CHANGELOG.md b/CHANGELOG.md index 8be7c5de..99c42b23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,15 @@ # ChangeLog +## Version 1.5.5 + +* New: Build logic module. +* Update: Kotlin modules dependency to v1.7.10. +* Update: Kotlin coroutines modules dependency to v1.6.4. +* Update: Material components dependency to v1.6.1. +* Update: Minor update of other libraries. + + ## Version 1.5.4 * Update: `SlidingPaneLayout` `panelOpens` extensions. Changed listener setting method from `set` to `add`. diff --git a/README.md b/README.md index 5c502544..11006fa8 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ [![Corbind](logo.svg)](https://ldralighieri.github.io/Corbind) [![Maven Central](https://img.shields.io/maven-central/v/ru.ldralighieri.corbind/corbind.svg)](https://search.maven.org/search?q=g:ru.ldralighieri.corbind) -[![Kotlin Version](https://img.shields.io/badge/Kotlin-v1.6.21-blue.svg)](https://kotlinlang.org) -[![Kotlin Coroutines Version](https://img.shields.io/badge/Coroutines-v1.6.1-blue.svg)](https://kotlinlang.org/docs/reference/coroutines-overview.html) +[![Kotlin Version](https://img.shields.io/badge/Kotlin-v1.7.10-blue.svg)](https://kotlinlang.org) +[![Kotlin Coroutines Version](https://img.shields.io/badge/Coroutines-v1.6.4-blue.svg)](https://kotlinlang.org/docs/reference/coroutines-overview.html) [![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/a1c9a1b1d1ce4ca7a201ab93492bf6e0)](https://app.codacy.com/gh/LDRAlighieri/Corbind) @@ -25,28 +25,28 @@ This library is for Android applications only. Help you to transform Android UI Platform bindings: ```groovy -implementation 'ru.ldralighieri.corbind:corbind:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind:1.5.5' ``` AndroidX library bindings: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-activity:1.5.4' -implementation 'ru.ldralighieri.corbind:corbind-appcompat:1.5.4' -implementation 'ru.ldralighieri.corbind:corbind-core:1.5.4' -implementation 'ru.ldralighieri.corbind:corbind-drawerlayout:1.5.4' -implementation 'ru.ldralighieri.corbind:corbind-leanback:1.5.4' -implementation 'ru.ldralighieri.corbind:corbind-lifecycle:1.5.4' -implementation 'ru.ldralighieri.corbind:corbind-navigation:1.5.4' -implementation 'ru.ldralighieri.corbind:corbind-recyclerview:1.5.4' -implementation 'ru.ldralighieri.corbind:corbind-slidingpanelayout:1.5.4' -implementation 'ru.ldralighieri.corbind:corbind-swiperefreshlayout:1.5.4' -implementation 'ru.ldralighieri.corbind:corbind-viewpager:1.5.4' -implementation 'ru.ldralighieri.corbind:corbind-viewpager2:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-activity:1.5.5' +implementation 'ru.ldralighieri.corbind:corbind-appcompat:1.5.5' +implementation 'ru.ldralighieri.corbind:corbind-core:1.5.5' +implementation 'ru.ldralighieri.corbind:corbind-drawerlayout:1.5.5' +implementation 'ru.ldralighieri.corbind:corbind-leanback:1.5.5' +implementation 'ru.ldralighieri.corbind:corbind-lifecycle:1.5.5' +implementation 'ru.ldralighieri.corbind:corbind-navigation:1.5.5' +implementation 'ru.ldralighieri.corbind:corbind-recyclerview:1.5.5' +implementation 'ru.ldralighieri.corbind:corbind-slidingpanelayout:1.5.5' +implementation 'ru.ldralighieri.corbind:corbind-swiperefreshlayout:1.5.5' +implementation 'ru.ldralighieri.corbind:corbind-viewpager:1.5.5' +implementation 'ru.ldralighieri.corbind:corbind-viewpager2:1.5.5' ``` Google 'material' library bindings: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-material:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-material:1.5.5' ``` Snapshot build: @@ -56,7 +56,7 @@ repositories { } dependencies { - implementation 'ru.ldralighieri.corbind:{module}:1.5.5-SNAPSHOT' + implementation 'ru.ldralighieri.corbind:{module}:1.5.6-SNAPSHOT' } ``` diff --git a/build-logic/convention/build.gradle.kts b/build-logic/convention/build.gradle.kts new file mode 100644 index 00000000..827cebb7 --- /dev/null +++ b/build-logic/convention/build.gradle.kts @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + `kotlin-dsl` +} + +group = "ru.ldralighieri.corbind.buildlogic" + +java { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 +} + +dependencies { + implementation(libs.android.gradlePlugin) + implementation(libs.kotlin.gradlePlugin) + implementation(libs.spotless.gradlePlugin) + implementation(libs.dokka.gradlePlugin) +} + +gradlePlugin { + plugins { + register("dokka") { + id = "corbind.dokka" + implementationClass = "DokkaConventionPlugin" + } + + register("library") { + id = "corbind.library" + implementationClass = "LibraryConventionPlugin" + } + + register("spotless") { + id = "corbind.spotless" + implementationClass = "SpotlessConventionPlugin" + } + } +} diff --git a/build-logic/convention/src/main/kotlin/DokkaConventionPlugin.kt b/build-logic/convention/src/main/kotlin/DokkaConventionPlugin.kt new file mode 100644 index 00000000..3cf2812c --- /dev/null +++ b/build-logic/convention/src/main/kotlin/DokkaConventionPlugin.kt @@ -0,0 +1,63 @@ +/* + * Copyright 2022 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import org.gradle.api.JavaVersion +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.withType +import org.jetbrains.dokka.gradle.DokkaTask +import java.net.URL + +@Suppress("unused") +class DokkaConventionPlugin : Plugin { + override fun apply(target: Project) { + with(target) { + pluginManager.apply("org.jetbrains.dokka") + + tasks.withType().configureEach { + dokkaSourceSets.named("main") { + jdkVersion.set(JavaVersion.VERSION_11.majorVersion.toInt()) + + skipDeprecated.set(false) + reportUndocumented.set(false) + skipEmptyPackages.set(true) + + sourceLink { + val relPath = rootProject.projectDir.toPath().relativize(projectDir.toPath()) + localDirectory.set(file("src/main/kotlin")) + remoteUrl.set(URL("https://github.com/LDRAlighieri/Corbind/tree/master/$relPath/src/main/kotlin")) + remoteLineSuffix.set("#L") + } + + externalDocumentationLink { + url.set(URL("https://developer.android.com/reference/")) + packageListUrl.set(URL("https://developer.android.com/reference/package-list")) + } + + externalDocumentationLink { + url.set(URL("https://developer.android.com/reference/")) + packageListUrl.set(URL("https://developer.android.com/reference/androidx/package-list")) + } + + externalDocumentationLink { + url.set(URL("https://developer.android.com/reference/")) + packageListUrl.set(URL("https://developer.android.com/reference/com/google/android/material/package-list")) + } + } + } + } + } +} diff --git a/build-logic/convention/src/main/kotlin/LibraryConventionPlugin.kt b/build-logic/convention/src/main/kotlin/LibraryConventionPlugin.kt new file mode 100644 index 00000000..bf84acc8 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/LibraryConventionPlugin.kt @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import com.android.build.gradle.LibraryExtension +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.configure +import ru.ldralighieri.corbind.configureKotlinAndroid + +@Suppress("unused") +class LibraryConventionPlugin : Plugin { + @Suppress("UnstableApiUsage") + override fun apply(target: Project) { + with(target) { + with(pluginManager) { + apply("com.android.library") + apply("kotlin-android") + apply("com.vanniktech.maven.publish") + } + + extensions.configure { + configureKotlinAndroid(this) + defaultConfig.targetSdk = findProperty("android.targetSdk").toString().toInt() + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + } + } + } +} diff --git a/build-logic/convention/src/main/kotlin/SpotlessConventionPlugin.kt b/build-logic/convention/src/main/kotlin/SpotlessConventionPlugin.kt new file mode 100644 index 00000000..eb9e368a --- /dev/null +++ b/build-logic/convention/src/main/kotlin/SpotlessConventionPlugin.kt @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import com.diffplug.gradle.spotless.SpotlessExtension +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.api.artifacts.VersionCatalogsExtension +import org.gradle.kotlin.dsl.configure +import org.gradle.kotlin.dsl.getByType + +@Suppress("unused") +class SpotlessConventionPlugin : Plugin { + override fun apply(target: Project) { + with(target) { + pluginManager.apply("com.diffplug.spotless") + + val libs = extensions.getByType().named("libs") + extensions.configure { + kotlin { + target("**/*.kt") + targetExclude("**/build/**/*.kt") + ktlint(libs.findVersion("ktlint").get().toString()) + licenseHeaderFile(rootProject.file("spotless/copyright.kt")) + } + } + } + } +} diff --git a/build-logic/convention/src/main/kotlin/ru/ldralighieri/corbind/Project+configureKotlinAndroid.kt b/build-logic/convention/src/main/kotlin/ru/ldralighieri/corbind/Project+configureKotlinAndroid.kt new file mode 100644 index 00000000..be509a87 --- /dev/null +++ b/build-logic/convention/src/main/kotlin/ru/ldralighieri/corbind/Project+configureKotlinAndroid.kt @@ -0,0 +1,58 @@ +/* + * Copyright 2022 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@file:Suppress("UnstableApiUsage") + +package ru.ldralighieri.corbind + +import com.android.build.api.dsl.CommonExtension +import org.gradle.api.JavaVersion +import org.gradle.api.Project +import org.gradle.api.plugins.ExtensionAware +import org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions + +internal fun Project.configureKotlinAndroid( + commonExtension: CommonExtension<*, *, *, *>, +) { + commonExtension.apply { + compileSdk = findProperty("android.compileSdk").toString().toInt() + + defaultConfig { + minSdk = findProperty("android.minSdk").toString().toInt() + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + + // Treat all Kotlin warnings as errors + allWarningsAsErrors = true + + freeCompilerArgs = freeCompilerArgs + listOf( + "-opt-in=kotlinx.coroutines.ObsoleteCoroutinesApi", + "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi" + ) + } + } +} + +private fun CommonExtension<*, *, *, *>.kotlinOptions(block: KotlinJvmOptions.() -> Unit) { + (this as ExtensionAware).extensions.configure("kotlinOptions", block) +} diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts new file mode 100644 index 00000000..641ddefd --- /dev/null +++ b/build-logic/settings.gradle.kts @@ -0,0 +1,33 @@ +/* + * Copyright 2022 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@file:Suppress("UnstableApiUsage") + +enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") + +dependencyResolutionManagement { + repositories { + google() + mavenCentral() + } + versionCatalogs { + create("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} + +include(":convention") diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 393d8607..00000000 --- a/build.gradle +++ /dev/null @@ -1,170 +0,0 @@ -/* - * Copyright 2019 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import io.gitlab.arturbosch.detekt.Detekt -import org.jetbrains.dokka.gradle.DokkaTask - -buildscript { - repositories { - gradlePluginPortal() - mavenCentral() - google() - } - - dependencies { - classpath(libs.bundles.plugins) - } -} - - -plugins { - alias(libs.plugins.spotless) - alias(libs.plugins.gver) - alias(libs.plugins.detekt) - alias(libs.plugins.dokka) -} - - -allprojects { - repositories { - mavenCentral() - google() - } -} - - -subprojects { - tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11 - - // Treat all Kotlin warnings as errors - allWarningsAsErrors = true - - // Enable experimental coroutines APIs - freeCompilerArgs += "-opt-in=kotlinx.coroutines.ObsoleteCoroutinesApi" - freeCompilerArgs += "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi" - } - } - - apply plugin: 'com.diffplug.spotless' - spotless { - kotlin { - target "**/*.kt" - targetExclude("$buildDir/**/*.kt") - targetExclude('bin/**/*.kt') - - ktlint(libs.versions.ktlint.get()) - licenseHeaderFile rootProject.file('spotless/copyright.kt') - } - } - - apply plugin: 'org.jetbrains.dokka' - tasks.withType(DokkaTask).configureEach { - dokkaSourceSets { - named("main") { - jdkVersion.set(JavaVersion.VERSION_11.majorVersion.toInteger()) - skipDeprecated.set(false) - reportUndocumented.set(false) - skipEmptyPackages.set(true) - - sourceLink { - def relPath = rootProject.projectDir.toPath().relativize(projectDir.toPath()) - localDirectory.set(new File("src/main/kotlin")) - remoteUrl.set(new URL("https://github.com/LDRAlighieri/Corbind/tree/master/$relPath/src/main/kotlin")) - remoteLineSuffix.set("#L") - } - - externalDocumentationLink { - url.set(new URL("https://developer.android.com/reference/")) - packageListUrl.set(new URL("https://developer.android.com/reference/package-list")) - } - - externalDocumentationLink { - url.set(new URL("https://developer.android.com/reference/")) - packageListUrl.set(new URL("https://developer.android.com/reference/androidx/package-list")) - } - - externalDocumentationLink { - url.set(new URL("https://developer.android.com/reference/")) - packageListUrl.set(new URL("https://developer.android.com/reference/com/google/android/material/package-list")) - } - } - } - } -} - - -detekt { - allRules = false - buildUponDefaultConfig = true - - config = files("default-detekt-config.yml") - source = files( - "corbind/src/main/kotlin", - "corbind-activity/src/main/kotlin", - "corbind-appcompat/src/main/kotlin", - "corbind-core/src/main/kotlin", - "corbind-drawerlayout/src/main/kotlin", - "corbind-leanback/src/main/kotlin", - "corbind-lifecycle/src/main/kotlin", - "corbind-material/src/main/kotlin", - "corbind-navigation/src/main/kotlin", - "corbind-recyclerview/src/main/kotlin", - "corbind-slidingpanelayout/src/main/kotlin", - "corbind-swiperefreshlayout/src/main/kotlin", - "corbind-viewpager/src/main/kotlin", - "corbind-viewpager2/src/main/kotlin" - ) - parallel = true -} - -tasks.withType(Detekt).configureEach { - jvmTarget = JavaVersion.VERSION_11 - reports { - html.required.set(true) - xml.required.set(false) - txt.required.set(false) - sarif.required.set(false) - } -} - - -configurations.all { - resolutionStrategy { - eachDependency { details -> - // Force all Kotlin stdlib artifacts to use the same version. - if (details.requested.group == 'org.jetbrains.kotlin' - && details.requested.name.startsWith('kotlin-stdlib')) { - details.useVersion libs.versions.kotlin.get() - } - } - } -} - - -def isNonStable = { String version -> - def stableKeyword = ['RELEASE', 'FINAL'] - .any { it -> version.toUpperCase().contains(it) } - def regex = /^[0-9,.v-]+(-r)?$/ - return !stableKeyword && !(version ==~ regex) -} - -dependencyUpdates { - rejectVersionIf { - isNonStable(it.candidate.version) - } -} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 00000000..f731a100 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,79 @@ +/* + * Copyright 2019 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask +import io.gitlab.arturbosch.detekt.Detekt + +buildscript { + dependencies { + classpath(libs.bundles.plugins) + } +} + +plugins { + alias(libs.plugins.detekt) + alias(libs.plugins.gver) +} + +// Detekt +detekt { + allRules = false + buildUponDefaultConfig = true + + config = files("default-detekt-config.yml") + source = files( + "corbind/src/main/kotlin", + "corbind-activity/src/main/kotlin", + "corbind-appcompat/src/main/kotlin", + "corbind-core/src/main/kotlin", + "corbind-drawerlayout/src/main/kotlin", + "corbind-leanback/src/main/kotlin", + "corbind-lifecycle/src/main/kotlin", + "corbind-material/src/main/kotlin", + "corbind-navigation/src/main/kotlin", + "corbind-recyclerview/src/main/kotlin", + "corbind-slidingpanelayout/src/main/kotlin", + "corbind-swiperefreshlayout/src/main/kotlin", + "corbind-viewpager/src/main/kotlin", + "corbind-viewpager2/src/main/kotlin" + ) + parallel = true +} + +tasks.withType().configureEach { + jvmTarget = JavaVersion.VERSION_11.toString() + reports { + html.required.set(true) + xml.required.set(false) + txt.required.set(false) + sarif.required.set(false) + } +} + +// Dependency updates +fun isNonStable(version: String): Boolean { + val stableKeyword = listOf("RELEASE", "FINAL") + .any { version.toUpperCase().contains(it) } + val regex = "^[0-9,.v-]+(-r)?$".toRegex() + val isStable = stableKeyword || regex.matches(version) + return isStable.not() +} + +tasks.withType { + rejectVersionIf { + isNonStable(candidate.version) + } +} diff --git a/corbind-activity/README.md b/corbind-activity/README.md index 29185316..03c85458 100644 --- a/corbind-activity/README.md +++ b/corbind-activity/README.md @@ -4,7 +4,7 @@ To add androidx activity bindings, import `corbind-activity` module: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-activity:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-activity:1.5.5' ``` ## List of extensions diff --git a/corbind-activity/build.gradle b/corbind-activity/build.gradle deleted file mode 100644 index ee3ee2bc..00000000 --- a/corbind-activity/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2021 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'com.vanniktech.maven.publish' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - minSdkVersion (findProperty("android.minSdk") as Integer) - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - api project(':corbind') - api libs.androidx.activity -} diff --git a/corbind-activity/build.gradle.kts b/corbind-activity/build.gradle.kts new file mode 100644 index 00000000..6df63bea --- /dev/null +++ b/corbind-activity/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * Copyright 2021 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("corbind.library") + id("corbind.spotless") + id("corbind.dokka") +} + +dependencies { + api(project(":corbind")) + api(libs.androidx.activity) +} diff --git a/corbind-activity/proguard-rules.pro b/corbind-activity/proguard-rules.pro index 481bb434..ff59496d 100644 --- a/corbind-activity/proguard-rules.pro +++ b/corbind-activity/proguard-rules.pro @@ -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 diff --git a/corbind-appcompat/README.md b/corbind-appcompat/README.md index 651fb648..acb9a655 100644 --- a/corbind-appcompat/README.md +++ b/corbind-appcompat/README.md @@ -4,7 +4,7 @@ To add androidx appcompat bindings, import `corbind-appcompat` module: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-appcompat:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-appcompat:1.5.5' ``` ## List of extensions diff --git a/corbind-appcompat/build.gradle b/corbind-appcompat/build.gradle deleted file mode 100644 index ae9c332f..00000000 --- a/corbind-appcompat/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'com.vanniktech.maven.publish' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - minSdkVersion (findProperty("android.minSdk") as Integer) - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - api project(':corbind') - api libs.androidx.appcompat -} diff --git a/settings.gradle b/corbind-appcompat/build.gradle.kts similarity index 54% rename from settings.gradle rename to corbind-appcompat/build.gradle.kts index 7a92dece..b34fd2d5 100644 --- a/settings.gradle +++ b/corbind-appcompat/build.gradle.kts @@ -14,23 +14,13 @@ * limitations under the License. */ -rootProject.name = 'Corbind' +plugins { + id("corbind.library") + id("corbind.spotless") + id("corbind.dokka") +} -include ':corbind' -include ':corbind-activity' -include ':corbind-appcompat' -include ':corbind-core' -include ':corbind-drawerlayout' -include ':corbind-leanback' -include ':corbind-lifecycle' -include ':corbind-material' -include ':corbind-navigation' -include ':corbind-recyclerview' -include ':corbind-slidingpanelayout' -include ':corbind-swiperefreshlayout' -include ':corbind-viewpager' -include ':corbind-viewpager2' - -include ':sample' - -enableFeaturePreview("VERSION_CATALOGS") +dependencies { + api(project(":corbind")) + api(libs.androidx.appcompat) +} diff --git a/corbind-appcompat/proguard-rules.pro b/corbind-appcompat/proguard-rules.pro index f1b42451..2f9dc5a4 100644 --- a/corbind-appcompat/proguard-rules.pro +++ b/corbind-appcompat/proguard-rules.pro @@ -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 diff --git a/corbind-core/README.md b/corbind-core/README.md index b6eb9a27..2e144976 100644 --- a/corbind-core/README.md +++ b/corbind-core/README.md @@ -4,7 +4,7 @@ To add androidx core bindings, import `corbind-core` module: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-core:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-core:1.5.5' ``` ## List of extensions diff --git a/corbind-core/build.gradle b/corbind-core/build.gradle deleted file mode 100644 index c4bcc9ee..00000000 --- a/corbind-core/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'com.vanniktech.maven.publish' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - minSdkVersion (findProperty("android.minSdk") as Integer) - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - api project(':corbind') - api libs.androidx.core -} diff --git a/corbind-core/build.gradle.kts b/corbind-core/build.gradle.kts new file mode 100644 index 00000000..bd63232d --- /dev/null +++ b/corbind-core/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * Copyright 2019 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("corbind.library") + id("corbind.spotless") + id("corbind.dokka") +} + +dependencies { + api(project(":corbind")) + api(libs.androidx.core) +} diff --git a/corbind-core/proguard-rules.pro b/corbind-core/proguard-rules.pro index f1b42451..2f9dc5a4 100644 --- a/corbind-core/proguard-rules.pro +++ b/corbind-core/proguard-rules.pro @@ -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 diff --git a/corbind-drawerlayout/README.md b/corbind-drawerlayout/README.md index 37cde395..9320396d 100644 --- a/corbind-drawerlayout/README.md +++ b/corbind-drawerlayout/README.md @@ -4,7 +4,7 @@ To add androidx drawerlayout bindings, import `corbind-drawerlayout` module: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-drawerlayout:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-drawerlayout:1.5.5' ``` ## List of extensions diff --git a/corbind-drawerlayout/build.gradle b/corbind-drawerlayout/build.gradle deleted file mode 100644 index aac6da54..00000000 --- a/corbind-drawerlayout/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'com.vanniktech.maven.publish' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - minSdkVersion (findProperty("android.minSdk") as Integer) - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - api project(':corbind') - api libs.androidx.drawerlayout -} diff --git a/corbind-drawerlayout/build.gradle.kts b/corbind-drawerlayout/build.gradle.kts new file mode 100644 index 00000000..33d4f277 --- /dev/null +++ b/corbind-drawerlayout/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * Copyright 2019 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("corbind.library") + id("corbind.spotless") + id("corbind.dokka") +} + +dependencies { + api(project(":corbind")) + api(libs.androidx.drawerlayout) +} diff --git a/corbind-drawerlayout/proguard-rules.pro b/corbind-drawerlayout/proguard-rules.pro index f1b42451..2f9dc5a4 100644 --- a/corbind-drawerlayout/proguard-rules.pro +++ b/corbind-drawerlayout/proguard-rules.pro @@ -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 diff --git a/corbind-leanback/README.md b/corbind-leanback/README.md index f469d6f9..fbff9f14 100644 --- a/corbind-leanback/README.md +++ b/corbind-leanback/README.md @@ -4,7 +4,7 @@ To add androidx leanback bindings, import `corbind-leanback` module: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-leanback:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-leanback:1.5.5' ``` ## List of extensions diff --git a/corbind-leanback/build.gradle b/corbind-leanback/build.gradle deleted file mode 100644 index d915571e..00000000 --- a/corbind-leanback/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'com.vanniktech.maven.publish' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - minSdkVersion (findProperty("android.minSdk") as Integer) - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - api project(':corbind') - api libs.androidx.leanback -} diff --git a/corbind-leanback/build.gradle.kts b/corbind-leanback/build.gradle.kts new file mode 100644 index 00000000..ccd491f2 --- /dev/null +++ b/corbind-leanback/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * Copyright 2019 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("corbind.library") + id("corbind.spotless") + id("corbind.dokka") +} + +dependencies { + api(project(":corbind")) + api(libs.androidx.leanback) +} diff --git a/corbind-leanback/proguard-rules.pro b/corbind-leanback/proguard-rules.pro index f1b42451..2f9dc5a4 100644 --- a/corbind-leanback/proguard-rules.pro +++ b/corbind-leanback/proguard-rules.pro @@ -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 diff --git a/corbind-lifecycle/README.md b/corbind-lifecycle/README.md index 85ba786e..1476b5a0 100644 --- a/corbind-lifecycle/README.md +++ b/corbind-lifecycle/README.md @@ -4,7 +4,7 @@ To add androidx lifecycle bindings, import `corbind-lifecycle` module: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-lifecycle:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-lifecycle:1.5.5' ``` ## List of extensions diff --git a/corbind-lifecycle/build.gradle b/corbind-lifecycle/build.gradle deleted file mode 100644 index bd23934f..00000000 --- a/corbind-lifecycle/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2021 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'com.vanniktech.maven.publish' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - minSdkVersion (findProperty("android.minSdk") as Integer) - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - api project(':corbind') - api libs.androidx.lifecycle.runtime.ktx -} diff --git a/corbind-lifecycle/build.gradle.kts b/corbind-lifecycle/build.gradle.kts new file mode 100644 index 00000000..1446c2de --- /dev/null +++ b/corbind-lifecycle/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * Copyright 2021 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("corbind.library") + id("corbind.spotless") + id("corbind.dokka") +} + +dependencies { + api(project(":corbind")) + api(libs.androidx.lifecycle.runtime.ktx) +} diff --git a/corbind-lifecycle/proguard-rules.pro b/corbind-lifecycle/proguard-rules.pro index 481bb434..ff59496d 100644 --- a/corbind-lifecycle/proguard-rules.pro +++ b/corbind-lifecycle/proguard-rules.pro @@ -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 diff --git a/corbind-material/README.md b/corbind-material/README.md index cc169b96..a0cf7d4a 100644 --- a/corbind-material/README.md +++ b/corbind-material/README.md @@ -4,7 +4,7 @@ To add material bindings, import `corbind-material` module: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-material:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-material:1.5.5' ``` ## List of extensions diff --git a/corbind-material/build.gradle b/corbind-material/build.gradle deleted file mode 100644 index daea1ec3..00000000 --- a/corbind-material/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'com.vanniktech.maven.publish' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - minSdkVersion (findProperty("android.minSdk") as Integer) - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - api project(':corbind') - api libs.material -} diff --git a/corbind-material/build.gradle.kts b/corbind-material/build.gradle.kts new file mode 100644 index 00000000..e2de6279 --- /dev/null +++ b/corbind-material/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * Copyright 2019 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("corbind.library") + id("corbind.spotless") + id("corbind.dokka") +} + +dependencies { + api(project(":corbind")) + api(libs.material) +} diff --git a/corbind-material/proguard-rules.pro b/corbind-material/proguard-rules.pro index f1b42451..2f9dc5a4 100644 --- a/corbind-material/proguard-rules.pro +++ b/corbind-material/proguard-rules.pro @@ -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 diff --git a/corbind-navigation/README.md b/corbind-navigation/README.md index 6524c5fd..2b8f7e6e 100644 --- a/corbind-navigation/README.md +++ b/corbind-navigation/README.md @@ -4,7 +4,7 @@ To add androidx navigation bindings, import `corbind-navigation` module: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-navigation:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-navigation:1.5.5' ``` ## List of extensions diff --git a/corbind-navigation/build.gradle b/corbind-navigation/build.gradle deleted file mode 100644 index d024cfca..00000000 --- a/corbind-navigation/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'com.vanniktech.maven.publish' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - minSdkVersion (findProperty("android.minSdk") as Integer) - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - api project(':corbind') - api libs.androidx.navigation -} diff --git a/corbind-navigation/build.gradle.kts b/corbind-navigation/build.gradle.kts new file mode 100644 index 00000000..73a9cbe3 --- /dev/null +++ b/corbind-navigation/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * Copyright 2019 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("corbind.library") + id("corbind.spotless") + id("corbind.dokka") +} + +dependencies { + api(project(":corbind")) + api(libs.androidx.navigation) +} diff --git a/corbind-navigation/proguard-rules.pro b/corbind-navigation/proguard-rules.pro index f1b42451..2f9dc5a4 100644 --- a/corbind-navigation/proguard-rules.pro +++ b/corbind-navigation/proguard-rules.pro @@ -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 diff --git a/corbind-recyclerview/README.md b/corbind-recyclerview/README.md index 07bd07f5..13480869 100644 --- a/corbind-recyclerview/README.md +++ b/corbind-recyclerview/README.md @@ -4,7 +4,7 @@ To add androidx recyclerview bindings, import `corbind-recyclerview` module: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-recyclerview:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-recyclerview:1.5.5' ``` ## List of extensions diff --git a/corbind-recyclerview/build.gradle b/corbind-recyclerview/build.gradle deleted file mode 100644 index e5cd3a88..00000000 --- a/corbind-recyclerview/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'com.vanniktech.maven.publish' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - minSdkVersion (findProperty("android.minSdk") as Integer) - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - api project(':corbind') - api libs.androidx.recyclerview -} diff --git a/corbind-recyclerview/build.gradle.kts b/corbind-recyclerview/build.gradle.kts new file mode 100644 index 00000000..c0165633 --- /dev/null +++ b/corbind-recyclerview/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * Copyright 2019 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("corbind.library") + id("corbind.spotless") + id("corbind.dokka") +} + +dependencies { + api(project(":corbind")) + api(libs.androidx.recyclerview) +} diff --git a/corbind-recyclerview/proguard-rules.pro b/corbind-recyclerview/proguard-rules.pro index f1b42451..2f9dc5a4 100644 --- a/corbind-recyclerview/proguard-rules.pro +++ b/corbind-recyclerview/proguard-rules.pro @@ -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 diff --git a/corbind-slidingpanelayout/README.md b/corbind-slidingpanelayout/README.md index f9c64bf5..cb6d76cd 100644 --- a/corbind-slidingpanelayout/README.md +++ b/corbind-slidingpanelayout/README.md @@ -4,7 +4,7 @@ To add androidx slidingpanelayout bindings, import `corbind-slidingpanelayout` module: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-slidingpanelayout:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-slidingpanelayout:1.5.5' ``` ## List of extensions diff --git a/corbind-slidingpanelayout/build.gradle b/corbind-slidingpanelayout/build.gradle deleted file mode 100644 index 2f36920c..00000000 --- a/corbind-slidingpanelayout/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'com.vanniktech.maven.publish' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - minSdkVersion (findProperty("android.minSdk") as Integer) - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - api project(':corbind') - api libs.androidx.slidingpanelayout -} diff --git a/corbind-slidingpanelayout/build.gradle.kts b/corbind-slidingpanelayout/build.gradle.kts new file mode 100644 index 00000000..7af692a4 --- /dev/null +++ b/corbind-slidingpanelayout/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * Copyright 2019 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("corbind.library") + id("corbind.spotless") + id("corbind.dokka") +} + +dependencies { + api(project(":corbind")) + api(libs.androidx.slidingpanelayout) +} diff --git a/corbind-slidingpanelayout/proguard-rules.pro b/corbind-slidingpanelayout/proguard-rules.pro index f1b42451..2f9dc5a4 100644 --- a/corbind-slidingpanelayout/proguard-rules.pro +++ b/corbind-slidingpanelayout/proguard-rules.pro @@ -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 diff --git a/corbind-swiperefreshlayout/README.md b/corbind-swiperefreshlayout/README.md index 7d7a4f80..69abfcc0 100644 --- a/corbind-swiperefreshlayout/README.md +++ b/corbind-swiperefreshlayout/README.md @@ -4,7 +4,7 @@ To add androidx swiperefreshlayout bindings, import `corbind-swiperefreshlayout` module: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-swiperefreshlayout:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-swiperefreshlayout:1.5.5' ``` ## List of extensions diff --git a/corbind-swiperefreshlayout/build.gradle b/corbind-swiperefreshlayout/build.gradle deleted file mode 100644 index 10f54d0a..00000000 --- a/corbind-swiperefreshlayout/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'com.vanniktech.maven.publish' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - minSdkVersion (findProperty("android.minSdk") as Integer) - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - api project(':corbind') - api libs.androidx.swiperefreshlayout -} diff --git a/corbind-swiperefreshlayout/build.gradle.kts b/corbind-swiperefreshlayout/build.gradle.kts new file mode 100644 index 00000000..c5e34a6e --- /dev/null +++ b/corbind-swiperefreshlayout/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * Copyright 2019 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("corbind.library") + id("corbind.spotless") + id("corbind.dokka") +} + +dependencies { + api(project(":corbind")) + api(libs.androidx.swiperefreshlayout) +} diff --git a/corbind-swiperefreshlayout/proguard-rules.pro b/corbind-swiperefreshlayout/proguard-rules.pro index f1b42451..2f9dc5a4 100644 --- a/corbind-swiperefreshlayout/proguard-rules.pro +++ b/corbind-swiperefreshlayout/proguard-rules.pro @@ -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 diff --git a/corbind-viewpager/README.md b/corbind-viewpager/README.md index 49a02595..dcf07b5f 100644 --- a/corbind-viewpager/README.md +++ b/corbind-viewpager/README.md @@ -4,7 +4,7 @@ To add androidx viewpager bindings, import `corbind-viewpager` module: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-viewpager:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-viewpager:1.5.5' ``` ## List of extensions diff --git a/corbind-viewpager/build.gradle b/corbind-viewpager/build.gradle deleted file mode 100644 index c95549d0..00000000 --- a/corbind-viewpager/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'com.vanniktech.maven.publish' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - minSdkVersion (findProperty("android.minSdk") as Integer) - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - api project(':corbind') - api libs.androidx.viewpager -} diff --git a/corbind-viewpager/build.gradle.kts b/corbind-viewpager/build.gradle.kts new file mode 100644 index 00000000..5147e68c --- /dev/null +++ b/corbind-viewpager/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * Copyright 2019 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("corbind.library") + id("corbind.spotless") + id("corbind.dokka") +} + +dependencies { + api(project(":corbind")) + api(libs.androidx.viewpager) +} diff --git a/corbind-viewpager/proguard-rules.pro b/corbind-viewpager/proguard-rules.pro index f1b42451..2f9dc5a4 100644 --- a/corbind-viewpager/proguard-rules.pro +++ b/corbind-viewpager/proguard-rules.pro @@ -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 diff --git a/corbind-viewpager2/README.md b/corbind-viewpager2/README.md index 5f4fc0df..cd715dd5 100644 --- a/corbind-viewpager2/README.md +++ b/corbind-viewpager2/README.md @@ -4,7 +4,7 @@ To add androidx viewpager2 bindings, import `corbind-viewpager2` module: ```groovy -implementation 'ru.ldralighieri.corbind:corbind-viewpager2:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind-viewpager2:1.5.5' ``` ## List of extensions diff --git a/corbind-viewpager2/build.gradle b/corbind-viewpager2/build.gradle deleted file mode 100644 index ae42763d..00000000 --- a/corbind-viewpager2/build.gradle +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2019 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'com.vanniktech.maven.publish' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - minSdkVersion (findProperty("android.minSdk") as Integer) - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - -dependencies { - api project(':corbind') - api libs.androidx.viewpager2 -} diff --git a/corbind-viewpager2/build.gradle.kts b/corbind-viewpager2/build.gradle.kts new file mode 100644 index 00000000..b276a39b --- /dev/null +++ b/corbind-viewpager2/build.gradle.kts @@ -0,0 +1,26 @@ +/* + * Copyright 2019 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("corbind.library") + id("corbind.spotless") + id("corbind.dokka") +} + +dependencies { + api(project(":corbind")) + api(libs.androidx.viewpager2) +} diff --git a/corbind-viewpager2/proguard-rules.pro b/corbind-viewpager2/proguard-rules.pro index f1b42451..2f9dc5a4 100644 --- a/corbind-viewpager2/proguard-rules.pro +++ b/corbind-viewpager2/proguard-rules.pro @@ -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 diff --git a/corbind/README.md b/corbind/README.md index 5190dfbf..f81574d8 100644 --- a/corbind/README.md +++ b/corbind/README.md @@ -4,7 +4,7 @@ To add platform bindings, import `corbind` module: ```groovy -implementation 'ru.ldralighieri.corbind:corbind:1.5.4' +implementation 'ru.ldralighieri.corbind:corbind:1.5.5' ``` ## List of extensions diff --git a/corbind/build.gradle b/corbind/build.gradle deleted file mode 100644 index db624715..00000000 --- a/corbind/build.gradle +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2019 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.library' - id 'kotlin-android' - id 'com.vanniktech.maven.publish' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - minSdkVersion (findProperty("android.minSdk") as Integer) - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - buildTypes { - release { - minifyEnabled false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - } -} - - -dependencies { - api libs.kotlin.stdlib - api libs.kotlin.coroutines.android - api libs.androidx.annotation -} diff --git a/corbind/build.gradle.kts b/corbind/build.gradle.kts new file mode 100644 index 00000000..ab0d1042 --- /dev/null +++ b/corbind/build.gradle.kts @@ -0,0 +1,27 @@ +/* + * Copyright 2019 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("corbind.library") + id("corbind.spotless") + id("corbind.dokka") +} + +dependencies { + api(libs.kotlin.stdlib) + api(libs.kotlin.coroutines.android) + api(libs.androidx.annotation) +} diff --git a/corbind/proguard-rules.pro b/corbind/proguard-rules.pro index f1b42451..2f9dc5a4 100644 --- a/corbind/proguard-rules.pro +++ b/corbind/proguard-rules.pro @@ -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 diff --git a/gradle.properties b/gradle.properties index b0d93ac8..05cac4ea 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,8 +10,11 @@ android.minSdk=14 # Maven +SONATYPE_HOST=DEFAULT +RELEASE_SIGNING_ENABLED=true + GROUP=ru.ldralighieri.corbind -VERSION_NAME=1.5.5-SNAPSHOT +VERSION_NAME=1.5.5 POM_DESCRIPTION=Kotlin Coroutines binding APIs for Android UI widgets from the platform and support libraries. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7857f427..00e83ede 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,32 +1,33 @@ [versions] -spotless = "6.5.2" +spotless = "6.8.0" gver = "0.42.0" -detekt = "1.20.0" +detekt = "1.21.0" dokka = "1.6.10" -maven-publish = "0.18.0" +maven-publish = "0.21.0" -plugin-android = "7.1.3" -plugin-kotlin = "1.6.21" +plugin-android = "7.2.1" -ktlint = "0.43.2" -kotlin = "1.6.21" -kotlin-coroutines = "1.6.1" +kotlin = "1.7.10" +kotlin-coroutines = "1.6.4" -androidx-core = "1.7.0" -androidx-annotation = "1.3.0" -androidx-appcompat = "1.4.1" +androidx-core = "1.8.0" +androidx-annotation = "1.4.0" +androidx-appcompat = "1.4.2" androidx-drawerlayout = "1.1.1" androidx-leanback = "1.0.0" -androidx-navigation = "2.4.2" +androidx-navigation = "2.5.0" androidx-recyclerview = "1.2.1" androidx-slidingpanelayout = "1.2.0" androidx-swiperefreshlayout = "1.1.0" androidx-viewpager = "1.0.0" androidx-viewpager2 = "1.0.0" -androidx-lifecycle = "2.4.1" -androidx-activity = "1.4.0" +androidx-lifecycle = "2.5.0" +androidx-activity = "1.5.0" +androidx-constraintlayout = "2.1.4" -material = "1.6.0" +material = "1.6.1" + +ktlint = "0.46.1" [plugins] @@ -37,9 +38,11 @@ dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } [libraries] -plugin-android = { module = "com.android.tools.build:gradle", version.ref = "plugin-android" } -plugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "plugin-kotlin" } -maven-publish = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "maven-publish" } +android-gradlePlugin = { module = "com.android.tools.build:gradle", version.ref = "plugin-android" } +kotlin-gradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } +dokka-gradlePlugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" } +publish-gradlePlugin = { module = "com.vanniktech:gradle-maven-publish-plugin", version.ref = "maven-publish" } +spotless-gradlePlugin = { module = "com.diffplug.spotless:spotless-plugin-gradle", version.ref = "spotless" } kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" } kotlin-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlin-coroutines" } @@ -57,13 +60,15 @@ androidx-viewpager = { module = "androidx.viewpager:viewpager", version.ref = "a androidx-viewpager2 = { module = "androidx.viewpager2:viewpager2", version.ref = "androidx-viewpager2" } androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidx-lifecycle" } androidx-activity = { module = "androidx.activity:activity", version.ref = "androidx-activity" } +androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidx-constraintlayout" } material = { module = "com.google.android.material:material", version.ref = "material" } [bundles] plugins = [ - "plugin-android", - "plugin-kotlin", - "maven-publish" + "android-gradlePlugin", + "kotlin-gradlePlugin", + "dokka-gradlePlugin", + "publish-gradlePlugin" ] diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e39e8b0c..97735d5c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -18,4 +18,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip diff --git a/sample/build.gradle b/sample/build.gradle deleted file mode 100644 index a56c7576..00000000 --- a/sample/build.gradle +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2019 Vladimir Raupov - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id 'com.android.application' - id 'kotlin-android' -} - -android { - compileSdkVersion (findProperty("android.compileSdk") as Integer) - defaultConfig { - applicationId "ru.ldralighieri.corbind.example" - minSdkVersion (findProperty("android.minSdk") as Integer) - targetSdkVersion (findProperty("android.targetSdk") as Integer) - versionCode 1 - versionName findProperty("VERSION_NAME") - - vectorDrawables.useSupportLibrary = true - - testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" - } - - buildTypes { - - debug { - debuggable true - minifyEnabled false - shrinkResources false - crunchPngs false - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - - release { - debuggable false - minifyEnabled true - shrinkResources true - crunchPngs true - proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' - } - - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 - } - - packagingOptions { - exclude 'META-INF/NOTICE' - exclude 'META-INF/NOTICE.txt' - exclude 'META-INF/notice.txt' - exclude 'META-INF/LICENSE' - exclude 'META-INF/LICENSE.txt' - exclude 'META-INF/license.txt' - exclude 'META-INF/atomicfu.kotlin_module' - } - - buildFeatures { viewBinding true } -} - -dependencies { - implementation project(":corbind-swiperefreshlayout") - - implementation libs.androidx.appcompat - implementation libs.androidx.lifecycle.runtime.ktx - implementation libs.material - implementation 'androidx.constraintlayout:constraintlayout:2.1.3' - -} diff --git a/sample/build.gradle.kts b/sample/build.gradle.kts new file mode 100644 index 00000000..cbaed1c5 --- /dev/null +++ b/sample/build.gradle.kts @@ -0,0 +1,77 @@ +/* + * Copyright 2019 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("com.android.application") + id("kotlin-android") +} + +android { + compileSdk = findProperty("android.compileSdk").toString().toInt() + defaultConfig { + applicationId = "ru.ldralighieri.corbind.example" + minSdk = findProperty("android.minSdk").toString().toInt() + targetSdk = findProperty("android.targetSdk").toString().toInt() + versionCode = 1 + versionName = findProperty("VERSION_NAME").toString() + + vectorDrawables.useSupportLibrary = true + } + + buildTypes { + debug { + isDebuggable = true + isMinifyEnabled = false + isShrinkResources = false + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + + release { + isDebuggable = false + isMinifyEnabled = true + isShrinkResources = true + proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro") + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + packagingOptions { + resources.excludes.apply { + add("META-INF/NOTICE") + add("META-INF/NOTICE.txt") + add("META-INF/notice.txt") + add("META-INF/LICENSE") + add("META-INF/LICENSE.txt") + add("META-INF/license.txt") + add("META-INF/atomicfu.kotlin_module") + } + } + + buildFeatures { viewBinding = true } +} + +dependencies { + implementation(project(":corbind-swiperefreshlayout")) + + implementation(libs.androidx.appcompat) + implementation(libs.androidx.lifecycle.runtime.ktx) + implementation(libs.androidx.constraintlayout) + implementation(libs.material) +} diff --git a/sample/proguard-rules.pro b/sample/proguard-rules.pro index f1b42451..2f9dc5a4 100644 --- a/sample/proguard-rules.pro +++ b/sample/proguard-rules.pro @@ -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 diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 00000000..1dc48224 --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,54 @@ +/* + * Copyright 2019 Vladimir Raupov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@file:Suppress("UnstableApiUsage") + +pluginManagement { + includeBuild("build-logic") + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} + +// https://github.com/gradle/gradle/issues/16608 +rootProject.name = "CorbindProject" + +include(":corbind") +include(":corbind-activity") +include(":corbind-appcompat") +include(":corbind-core") +include(":corbind-drawerlayout") +include(":corbind-leanback") +include(":corbind-lifecycle") +include(":corbind-material") +include(":corbind-navigation") +include(":corbind-recyclerview") +include(":corbind-slidingpanelayout") +include(":corbind-swiperefreshlayout") +include(":corbind-viewpager") +include(":corbind-viewpager2") + +include(":sample")