kotlinpoet-utils

KotlinPoet Utilities

License

License

Lesser General Public License, version 3 or greater
Categories

Categories

Kotlin Languages
GroupId

GroupId

com.github.manosbatsis.kotlinpoet-utils
ArtifactId

ArtifactId

kotlinpoet-utils
Last Version

Last Version

0.5
Release Date

Release Date

Type

Type

jar
Description

Description

kotlinpoet-utils
KotlinPoet Utilities
Project URL

Project URL

https://github.com/manosbatsis/kotlinpoet-utils
Source Code Management

Source Code Management

https://github.com/manosbatsis/kotlinpoet-utils

Download kotlinpoet-utils

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.manosbatsis.kotlinpoet-utils/kotlinpoet-utils/ -->
<dependency>
    <groupId>com.github.manosbatsis.kotlinpoet-utils</groupId>
    <artifactId>kotlinpoet-utils</artifactId>
    <version>0.5</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.manosbatsis.kotlinpoet-utils/kotlinpoet-utils/
implementation 'com.github.manosbatsis.kotlinpoet-utils:kotlinpoet-utils:0.5'
// https://jarcasting.com/artifacts/com.github.manosbatsis.kotlinpoet-utils/kotlinpoet-utils/
implementation ("com.github.manosbatsis.kotlinpoet-utils:kotlinpoet-utils:0.5")
'com.github.manosbatsis.kotlinpoet-utils:kotlinpoet-utils:jar:0.5'
<dependency org="com.github.manosbatsis.kotlinpoet-utils" name="kotlinpoet-utils" rev="0.5">
  <artifact name="kotlinpoet-utils" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.manosbatsis.kotlinpoet-utils', module='kotlinpoet-utils', version='0.5')
)
libraryDependencies += "com.github.manosbatsis.kotlinpoet-utils" % "kotlinpoet-utils" % "0.5"
[com.github.manosbatsis.kotlinpoet-utils/kotlinpoet-utils "0.5"]

Dependencies

runtime (4)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-jdk7 jar 1.2.71
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.2.71
org.jetbrains.kotlin : kotlin-reflect jar 1.2.71
com.squareup : kotlinpoet jar 1.4.1

test (2)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-test jar 1.2.71
org.jetbrains.kotlin : kotlin-test-junit jar 1.2.71

Project Modules

There are no modules declared in this project.

Kotlin Utils Maven Central

Utils API

Commons utilities for code generated by Utils Kapt or Kotlin apps in general.

Utils Kapt

KotlinPoet/Kapt utilities for Kotlin annotation processor (sub)components.

Add to your build:

dependencies {
    // ...
    api("com.github.manosbatsis.kotlin-utils:kotlin-utils-kapt:$kotlinpoetutils_version")
}

To use, add the ProcessingEnvironmentAware to your annotation processor:

import javax.annotation.processing.AbstractProcessor.AbstractProcessor
import com.github.manosbatsis.kotlin.utils.ProcessingEnvironmentAware

class MyAnnotationProcessor : AbstractProcessor(), ProcessingEnvironmentAware {

    
    /**
     * Implement [ProcessingEnvironmentAware.processingEnvironment] 
     * for access to a [ProcessingEnvironment]
     */
    override val processingEnvironment: ProcessingEnvironment by lazy {
        processingEnv
    }
}

... or sub-component:

import javax.annotation.processing.AbstractProcessor.AbstractProcessor
import com.github.manosbatsis.kotlin.utils.ProcessingEnvironmentAware

class MyCustomAnnotationProcessingComponent(
    override val processingEnvironment: ProcessingEnvironment 
) : ProcessingEnvironmentAware {
    
    fun doSometing(){
        // Do it!
    }

}

Versions

Version
0.5
0.4
0.3
0.2
0.1