TealOcean / BuildSrc

Convenience build tool extensions for Gradle - Kotlin and Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BuildSrc

Build

Convenience build tool extensions for Gradle - Kotlin and Android

The plugins are available in the Gradle Plugin Portal and support the plugins DSL.

Adaptive Plugins

A collection of plugins patching minor issues of other plugins. These are identified by their id only. Thus no dependencies are defined or required.

Fix IDEA Plugin

Plugin

Fix minor issues within IDEA regarding source sets of Kotlin and Test Fixtures.

id 'xyz.tynn.idea.fix' version 'x.y.z'

kotlin-android

Include all Kotlin source directories into the Java source sets for Android modules. A manual configuration for Android Studio is unnecessary.

Just remove lines like the following

main.java.srcDirs += 'src/main/kotlin'
sourceSets["main"].java.srcDir("src/main/kotlin")

java-test-fixtures

The testFixtures source sets are added as test source directories and to the PROVIDED scope.

Elements Plugins

A collection of plugins to help publishing Java Library projects with Gradle metadata.

Jvm

Jvm Library KDoc

Plugin

Provides a kdocElements configuration and a kdocJar task to create Java and Kotlin variant KDoc artifact. This artifact is added to the java component when requested with withKdocJar. This plugin uses dokka and requires it in the build classpath only.

id 'org.jetbrains.dokka' version '0.10.1'
id 'xyz.tynn.jvm.kdoc' version 'x.y.z'
Usage
java {
    withJavadocJar()
    withKdocJar()
    withSourcesJar()
}

publishing {
    publications {
        jvm(MavenPublication) {
            from components.java
        }
    }
}

Publishing Plugins

A collection of plugins to help publishing Android Library projects with Gradle metadata.

Android

A collection of plugins utilising the Support for the Maven Publish plugin available from version 3.6 of the Android Gradle plugin.

Android Library Maven

Plugin

Provides publications for all release variant components provided with the Support for the Maven Publish plugin.

id 'xyz.tynn.android.maven' version 'x.y.z'

The artifact id of each publication contains the product flavors in form of project.name-flavor1.name-flavor2.name.

A release component and publication is provided when built with Gradle 6.0 or later. The publication contains the module meta data to link product flavors to their publications. The product flavor dimensions always contain a namespace defaulting to the group of the module.

Configuration and Publication naming
  • release
  • variantName
  • variantNameMetaPublication

Android Library Javadoc

Plugin

Provides configurations and tasks for Java variant javadoc artifacts. These artifacts are added to the components provided with the Support for the Maven Publish plugin.

id 'xyz.tynn.android.javadoc' version 'x.y.z'
Task and Configuration naming
  • :variantNameJavadoc
  • :variantNameJavadocJar
  • variantNameJavadocPublication
  • variantNameAllJavadocPublication

Android Library KDoc

Plugin

Provides configurations and tasks for Java and Kotlin variant KDoc artifacts. These artifacts are added to the components provided with the Support for the Maven Publish plugin from version 3.6 of the Android Gradle plugin. This plugin uses dokka and requires it in the build classpath only.

id 'org.jetbrains.dokka' version '0.10.1' apply false
id 'xyz.tynn.android.kdoc' version 'x.y.z'
Task and Configuration naming
  • :variantNameKdoc
  • :variantNameKdocJar
  • variantNameKdocPublication
  • variantNameAllKdocPublication

Android Library Sources

Plugin

Provides configurations and tasks for Java and Kotlin variant sources artifacts. These artifacts are added to the components provided with the Support for the Maven Publish plugin

id 'xyz.tynn.android.sources' version 'x.y.z'
Task and Configuration naming
  • :variantNameSourcesJar
  • variantNameSourcesPublication
  • variantNameAllSourcesPublication

License

Copyright (C) 2019-2020 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.

About

Convenience build tool extensions for Gradle - Kotlin and Android

License:Apache License 2.0


Languages

Language:Java 72.7%Language:Groovy 27.3%