• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

palantir/gradle-processors: Gradle plugin for integrating Java annotation proces ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

palantir/gradle-processors

开源软件地址(OpenSource Url):

https://github.com/palantir/gradle-processors

开源编程语言(OpenSource Language):

Groovy 99.7%

开源软件介绍(OpenSource Introduction):

Autorelease

Gradle Processors

A plugin for Gradle that cleans up integration of Java annotation processors with the Eclipse and IDEA plugins.

GitHub release Travis license

Quickstart

To use it, add the following to your projects' build.gradle file:

plugins {
  id 'org.inferred.processors' version '<LATEST VERSION>'
}

The eclipse and idea tasks will now configure your IDE to run annotation processors as part of their regular compilation when you use an annotationProcessor dependency.

dependencies {
  annotationProcessor 'com.google.dagger:dagger-compiler:2.8'
  implementation 'com.google.dagger:dagger:2.8'
}

Gradle 4.5 and earlier

If you are still using Gradle 4.5 or earlier, you can use the legacy processor dependency type to enable annotation processing:

dependencies {
  processor 'com.google.auto.value:auto-value:1.0'
}

This functions as a combination of the modern "annotationProcessor" and "compileOnly" blocks: it both enables the annotation processor, and makes any annotations it exposes available to use in source code.

Gradle 2.0 and earlier

For users of Gradle 2.0 and earlier, the plugins API is not available. Instead, add the following to your top-level build.gradle file:

buildscript {
  repositories {
    maven {
      url 'https://plugins.gradle.org/m2/'
    }
  }
  dependencies {
    classpath 'gradle.plugin.org.inferred:gradle-processors:<LATEST VERSION>'
  }
}

And just the apply directive to your subproject build.gradle files:

apply plugin: 'org.inferred.processors'

You can now include annotation processors with the processor dependency type, as above.

Building from source

To build the project from source, run ./gradlew build, or gradlew.bat build on Windows, in the root directory of your checkout. You will need Java installed.

License

Copyright 2015 Palantir Technologies, Inc. All rights reserved.

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.



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap