plugins {
id 'xyz.tynn.convention.project' version 'x.y.z'
}
The published base convention plugin which should be applied to the root project.
- Applies
xyz.tynn.convention.android
to all Android application and library projects - Applies
xyz.tynn.convention.release
to all projects withmaven-publish
- Configures the Versions Plugin to use the current Gradle release and disallow release candidates as upgradable versions from stable versions
- Configures all
Test
tasks to log the full exception on failure - Configures the
wrapper
task to use the complete Gradle distribution by default - Creates a
clean
task if none has been added after the evaluation
plugins {
id 'xyz.tynn.convention.bom'
}
Configures the project
to collect all other published projects to create a
Gradle BOM to align the dependency versions.
plugins {
id 'xyz.tynn.convention.android'
}
Configures an Android project and provides a marker plugin to simplify further configurations.
subprojects {
pluginManager.withPlugin('xyz.tynn.convention.android') {
android {
...
}
}
}
- Sets the namespace to
${group}.${project.name}
- Sets the compile and target SDK level to 33
- Sets the minimum SDK level to 24 by default
- Override with
android.defaults.sdk.min
ingradle.properties
- Override with
- Uses the AndroidX test runner by default
Enables minification by default and uses the debug signing config for builds.
Configures a .debug
application id suffix and +debug
version name suffix.
Configures Lint to abort on error and treat warnings as errors.
Uses the Kotlin explicit API configuration for Android. Instead of adding
-Xexplicit-api=strict
manually it is now possible to just use the Kotlin
DSL variants.
kotlin {
explicitApi()
}
plugins {
id 'xyz.tynn.convention.release'
}
Configures a Kotlin project and provides a marker plugin to simplify further configurations. It adds an implementation dependency to the Stdlib and a test implementation dependency Kotlin Test.
plugins {
id 'xyz.tynn.convention.release'
}
Configures Maven publishing of a release publication for the project
.
The POM is setup with project.name
and PROJECT_URL
environment variable.
Optionally configures signing if the SIGNING_KEY
and SIGNING_PASSWORD
environment variables are provided.
java
java-platform
version-catalog
com.android.library
Copyright (C) 2019-2023 Christian Schmitz
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.