• Stars
    star
    455
  • Rank 96,175 (Top 2 %)
  • Language
    Kotlin
  • License
    MIT License
  • Created over 4 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ˜ A template to let you started with custom Gradle Plugins + Kotlin in a few seconds

kotlin-gradle-plugin-template ๐Ÿ˜

Use this template Pre Merge Checks License Language

A simple Github template that lets you create a Gradle Plugin ๐Ÿ˜ project using 100% Kotlin and be up and running in a few seconds.

This template is focused on delivering a project with static analysis and continuous integration already in place.

How to use ๐Ÿ‘ฃ

Just click on Use this template button to create a new repo starting from this template.

Once created don't forget to update the:

Features ๐ŸŽจ

  • 100% Kotlin-only template.
  • Plugin build setup with composite build.
  • 100% Gradle Kotlin DSL setup.
  • Dependency versions managed via Gradle Versions Catalog (libs.versions.toml).
  • CI Setup with GitHub Actions.
  • Kotlin Static Analysis via ktlint and detekt.
  • Publishing-ready to Gradle Portal.
  • Issues Template (bug report + feature request)
  • Pull Request Template.

Composite Build ๐Ÿ“ฆ

This template is using a Gradle composite build to build, test and publish the plugin. This means that you don't need to run Gradle twice to test the changes on your Gradle plugin (no more publishToMavenLocal tricks or so).

The included build is inside the plugin-build folder.

preMerge task

A preMerge task on the top level build is already provided in the template. This allows you to run all the check tasks both in the top level and in the included build.

You can easily invoke it with:

./gradlew preMerge

If you need to invoke a task inside the included build with:

./gradlew -p plugin-build <task-name>

Dependency substitution

Please note that the project relies on module name/group in order for dependency substitution to work properly. If you change only the plugin ID everything will work as expected. If you change module name/group, things might break and you probably have to specify a substitution rule.

Publishing ๐Ÿš€

This template is ready to let you publish to Gradle Portal.

The Publish Plugin to Portal Github Action will take care of the publishing whenever you push a tag.

Please note that you need to configure two secrets: GRADLE_PUBLISH_KEY and GRADLE_PUBLISH_SECRET with the credetials you can get from your profile on the Gradle Portal.

100% Kotlin ๐Ÿ…บ

This template is designed to use Kotlin everywhere. The build files are written using Gradle Kotlin DSL as well as the Plugin DSL to setup the build.

Dependencies are centralized inside the libs.versions.toml.

Moreover, a minimalistic Gradle Plugin is already provided in Kotlin to let you easily start developing your own around it.

Static Analysis ๐Ÿ”

This template is using ktlint with the ktlint-gradle plugin to format your code. To reformat all the source code as well as the buildscript you can run the ktlintFormat gradle task.

This template is also using detekt to analyze the source code, with the configuration that is stored in the detekt.yml file (the file has been generated with the detektGenerateConfig task).

CI โš™๏ธ

This template is using GitHub Actions as CI. You don't need to setup any external service and you should have a running CI once you start using this template.

There are currently the following workflows available:

Contributing ๐Ÿค

Feel free to open a issue or submit a pull request for any bugs/improvements.

License ๐Ÿ“„

This template is licensed under the MIT License - see the License file for details. Please note that the generated template is offering to start with a MIT license but you can change it to whatever you wish, as long as you attribute under the MIT terms that you're using the template.

More Repositories

1

kotlin-android-template

Android + Kotlin + Github Actions + ktlint + Detekt + Gradle Kotlin DSL + buildSrc = โค๏ธ
Kotlin
1,707
star
2

slidetoact

A simple 'Slide to Unlock' Material widget for Android, written in Kotlin ๐Ÿ“ฑ๐ŸŽจ๐Ÿฆ„
Kotlin
1,179
star
3

ktfmt-gradle

A Gradle plugin to apply ktfmt to your builds, and reformat you Kotlin source code like a glimpse ๐Ÿงน๐Ÿ˜
Kotlin
149
star
4

kscript-template

๐Ÿ“œ Get started with kscript in a few seconds... with colored logs, github actions and more!
Kotlin
35
star
5

myonnaise

๐Ÿฏ A RxJava library to access Raw EMG data from your Myo ๐Ÿ“ˆ (plus an Android companion App ๐Ÿ“ฑ)
Kotlin
29
star
6

tech-conferences-italy

A community-curated list of conferences around Italy ๐Ÿ‡ฎ๐Ÿ‡น
HTML
26
star
7

rules4android

A collection of JUnit 4 Rules for Android Developers ๐Ÿ”ฌ
Kotlin
25
star
8

thebakery

Website for The Developers' Bakery Podcast ๐Ÿ‘จโ€๐Ÿณ
HTML
25
star
9

alfred-looks

โ•ฐ(โ—•ใƒฎโ—•)ใคยค=[]โ€”โ€”โ€” A collection of Alfred 4 snippets from looks.wtf (โŒโ– _โ– )
Kotlin
9
star
10

telebot

A Telegram Bot skeleton written in Go (a.k.a. your bot in 20 lines)
Go
7
star
11

cortinico.github.io

Just my personal website โœˆ๏ธ
JavaScript
6
star
12

mno-notes

Public repository of MNO students' notes (University of Pisa)
TeX
5
star
13

adventofcode-2020

๐ŸŽ… Marry XMas ๐ŸŽ„ Kotlin solutions for my Advent of Code 2020 ๐Ÿคถ
Kotlin
5
star
14

adventofcode-2021

๐ŸŽ… Marry XMas ๐ŸŽ„ Kotlin solutions for my Advent of Code 2021 ๐Ÿคถ
Kotlin
5
star
15

space-unlimited-space

๐Ÿ“ฆ Unleash the power of Github Container Registry to store artifacts and consume them auth-free.
5
star
16

docker-redex

Docker file for Facebook ReDex container (zip your apks inside a container)
M4
4
star
17

gulp-letsencrypt

Slides of letsencrypt seminar - 2016 GULP (Pisa Linux User Group)
TeX
4
star
18

docker-java8-32bit

Dockerfile for creating a 32bit containter and Java8 JRE
3
star
19

p2p-gossipico

A simulation of Gossipico with Peersim - Final assignment of P2P course (unipi)
TeX
3
star
20

reproducer-grammarly-textinput

Reproducer for ANR on Samsung devices with Grammarly integration
Kotlin
3
star
21

p2p-pingpong

A simulation of Gnutella Ping Pong protocol - 1st assignment of P2P course (unipi)
Java
2
star
22

cortinico

2
star
23

adventofcode-2022

๐ŸŽ… Marry XMas ๐ŸŽ„ Kotlin solutions for my Advent of Code 2022 ๐Ÿคถ
Kotlin
2
star
24

sol-cars

A simple system for car sharing - Final project of operting system course SOL (unipi)
C
2
star
25

android-beginners-material

A list of material for wannabe Android developers
2
star
26

telebotgae

A Telegram Bot skeleton written in Go with App Engine super powers (deploy in several seconds!)
Go
2
star
27

repro-36296

Reproducer for https://github.com/facebook/react-native/issues/36296
Java
2
star
28

adventofcode-2023

๐ŸŽ… Marry XMas ๐ŸŽ„ Kotlin solutions for my Advent of Code 2023 ๐Ÿคถ
Kotlin
2
star
29

RnReproducer32595

Java
1
star
30

reproducer-rnscreens-bridgeless

Kotlin
1
star
31

gulp-raspi

Slides del seminario del Linux Day 2014 Pisa su Raspberry Pi
TeX
1
star
32

reproducer-strictmodeviolation

Reproducer for https://issuetracker.google.com/issues/270704908
Kotlin
1
star
33

ae-drisc

A DRISC intrepreter written in OCaml - Course of System Architecture AE (unipi)
OCaml
1
star
34

reproducer-private-maven-repo

TypeScript
1
star
35

reproducer-cxx-tm-autolinking

Example on how to use C++ TurboModules with Autolinking on Android
Ruby
1
star