A Kotlin compiler plugin implementation of AutoService

Overview

auto-service-kt

A Kotlin compiler plugin implementation of AutoService.

Usage

Simply add the auto-service-kt Gradle Plugin.

Maven Central

plugins {
  id("dev.zacsweers.autoservice") version "<version>"
  // ...
}

// Optional if you want to force a newer AutoService annotations version
autoService {
  annotationsVersion.set("1.0")
}

Then annotate your service implementation with @AutoService as your normally would in source files.

Caveats

While the AutoService annotation processor will merge existing service files, but this is not currently implemented in this plugin yet.

AutoService's verify and verbose options are also not yet implemented.

Snapshots of the development version are available in Sonatype's snapshots repository.

License

Copyright 2021 Zac Sweers

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.
You might also like...
Wiroforce godot plugin for kotlin
Wiroforce godot plugin for kotlin

Wiroforce Godot Plugin The purpose of this project is the creation of a plugin f

HH Synthetic -- plugin for automated migration from Kotlin synthetics to View Binding.
HH Synthetic -- plugin for automated migration from Kotlin synthetics to View Binding.

HH Synthetic -- plugin for automated migration from Kotlin synthetics to View Binding.

GPP is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and then promoting your App Bundle or APK to publishing app listings and other metadata.
GPP is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and then promoting your App Bundle or APK to publishing app listings and other metadata.

Gradle Play Publisher Gradle Play Publisher is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and

A Gradle plugin to report the number of method references in your APK on every build.
A Gradle plugin to report the number of method references in your APK on every build.

Dexcount Gradle Plugin A Gradle plugin to report the number of method references in your APK, AAR, or java module. This helps you keep tabs on the gro

This plugin help you to set material design icon to your project.
This plugin help you to set material design icon to your project.

Android Material Design Icon Generator Plugin This plugin help you to set material design icons to your Android project. Installation Manually Downloa

IntelliJ Plugin for Android Parcelable boilerplate code generation.
IntelliJ Plugin for Android Parcelable boilerplate code generation.

IntelliJ/Android Studio Plugin for Android Parcelable boilerplate code generation This tool generates an Android Parcelable implementation based on fi

A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.
A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.

ADB Idea A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development. The following commands are provided: Uninst

Android Studio plugin which automatically generates drawable selectors from appropriately named resources.
Android Studio plugin which automatically generates drawable selectors from appropriately named resources.

SelectorChapek for Android This Android Studio plugin automatically generates drawable selectors from appropriately named Android resources. How to in

Maven Plugin for Android Application development and more

ANDROID MAVEN PLUGIN A plugin for Android application development with Apache Maven 3.0.5+ and the Android SDK. Please check out our website for furth

Comments
  • Get it working with IR enabled

    Get it working with IR enabled

    This fails internally in kotlinc when I test it. Also effectively blocks updating to Kotlin 1.5.0

    Caused by: java.lang.AssertionError: IR backend shouldn't call KotlinTypeMapper.mapType: TestClass
    	at org.jetbrains.kotlin.codegen.state.KotlinTypeMapper.mapType(KotlinTypeMapper.kt:271)
    	at org.jetbrains.kotlin.codegen.state.KotlinTypeMapper.mapClass(KotlinTypeMapper.kt:232)
    	at org.jetbrains.kotlin.codegen.MemberCodegen.genClassOrObject(MemberCodegen.java:300)
    	at org.jetbrains.kotlin.codegen.MemberCodegen.genClassOrObject(MemberCodegen.java:289)
    	at org.jetbrains.kotlin.codegen.PackageCodegenImpl.generateClassesAndObjectsInFile(PackageCodegenImpl.java:119)
    	at org.jetbrains.kotlin.codegen.PackageCodegenImpl.generateFile(PackageCodegenImpl.java:138)
    	at org.jetbrains.kotlin.codegen.PackageCodegenImpl.generate(PackageCodegenImpl.java:70)
    	... 74 more
    
    enhancement 
    opened by ZacSweers 1
Owner
Zac Sweers
Mobile @ Slack
Zac Sweers
Kotlin compiler plugin generates support synthetic methods for use SaveStateHandle without constants and string variables.

SavedState Compiler Plugin Kotlin compiler plugin generates support methods for use SaveStateHandle without constants and string variables. Example If

Anton Nazarov 3 Sep 20, 2022
BuildPlots-Plugin - PaperMC-Plugin for build contests written in Kotlin.

BuildPlotsPlugin PaperMC-Plugin for build contests. This is my first time using Kotlin and the first plugin I've written after a long time. It is stil

Lukas Heinzl 0 Jan 1, 2022
gradle-android-scala-plugin adds scala language support to official gradle android plugin

gradle-android-scala-plugin gradle-android-scala-plugin adds scala language support to official gradle android plugin. See also sample projects at htt

saturday06 345 Dec 10, 2022
eventbus-intellij-plugin 3.8 0.0 L1 Java Plugin to navigate between events posted by EventBus.

eventbus-intellij-plugin Plugin to navigate between events posted by EventBus. Post to onEvent and onEvent to Post Install There are two ways. Prefere

Shinnosuke Kugimiya 315 Aug 8, 2022
IntelliJ Idea Astor Plugin is a plugin that integrates Astor in Intellij Idea

IntelliJ Idea Astor Plugin IntelliJ Idea Astor Plugin is a plugin that integrates Astor in Intellij Idea. It communicates with a local/remote program

null 4 Aug 28, 2021
Intellij-platform-plugin-template - IntelliJ Platform Plugin Template

IntelliJ Platform Plugin Template TL;DR: Click the Use this template button and

null 0 Jan 1, 2022
K6-intellij-plugin - IntelliJ-based Plugin to run k6 tests locally or in the k6 Cloud from your IntelliJ IDE

IntelliJ-based Plugin to run k6 tests locally or in the k6 Cloud from your Intel

Mikhail Bolotov 8 Jan 2, 2023
Ownership-gradle-plugin - Gradle code ownership verification plugin

Gradle code ownership verification plugin A gradle plugin that will verify owner

null 4 Dec 15, 2022
CKlib is a gradle plugin that will build and package C/C++/Objective-C code for Kotlin/Native.

C Klib CKlib is a gradle plugin that will build and package C/C++/Objective-C code for Kotlin/Native. The Problem When you want to access C-etc code f

Touchlab 73 Nov 8, 2022