Package Identifier Plugin

Gradle plugin for identifiying android modules

License

License

Categories

Categories

IDE Development Tools
GroupId

GroupId

com.trello.identifier
ArtifactId

ArtifactId

package-identifier-plugin
Last Version

Last Version

0.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

Package Identifier Plugin
Gradle plugin for identifiying android modules
Project URL

Project URL

https://github.com/trello/package-identifier
Source Code Management

Source Code Management

https://github.com/trello/package-identifier

Download package-identifier-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/com.trello.identifier/package-identifier-plugin/ -->
<dependency>
    <groupId>com.trello.identifier</groupId>
    <artifactId>package-identifier-plugin</artifactId>
    <version>0.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.trello.identifier/package-identifier-plugin/
implementation 'com.trello.identifier:package-identifier-plugin:0.0.2'
// https://jarcasting.com/artifacts/com.trello.identifier/package-identifier-plugin/
implementation ("com.trello.identifier:package-identifier-plugin:0.0.2")
'com.trello.identifier:package-identifier-plugin:jar:0.0.2'
<dependency org="com.trello.identifier" name="package-identifier-plugin" rev="0.0.2">
  <artifact name="package-identifier-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.trello.identifier', module='package-identifier-plugin', version='0.0.2')
)
libraryDependencies += "com.trello.identifier" % "package-identifier-plugin" % "0.0.2"
[com.trello.identifier/package-identifier-plugin "0.0.2"]

Dependencies

runtime (4)

Group / Artifact Type Version
com.trello.identifier : package-identifier-annotations jar 0.0.2
com.android.tools.build : gradle jar 3.2.1
org.jetbrains.kotlin : kotlin-stdlib-jdk7 jar 1.3.0
com.squareup : kotlinpoet jar 1.0.0

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Package Identifier

A gradle plugin for generating package identifiers in your modules. This plugin isn't meant for direct usage in runtime code, but rather to help your libraries be module aware.

Every module in a project will generate a file that looks like this:

     // Generated, do not modify!
     package com.trello.sample
     
     import com.trello.identifier.annotation.PackageId
     
     @PackageId(isDebug = false)
     class PackageIdentifier
     

and another like this:

     // Generated, do not modify!
     package com.trello.sample
     
     import com.trello.identifier.annotation.PackageId
     
     @PackageId(isDebug = true)
     class PackageIdentifier
     

Annotation processors can then use the enclosing package of the class annotated by @PackageId in order to generate files into module specific packages. Additionally, parsing the isDebug field allows you to handle debug variants differently from release variants.

Usage

buildscript {
  repositories {
    mavenCentral()
    google()
   }
  dependencies {
    classpath 'com.trello.identifier:package-identifier-plugin:0.0.2'
  }
}

and then apply to your modules

apply plugin: 'com.trello.identifier'

Contributors

Pull requests, issues and comments welcome. For pull requests:

  • Add tests for new features and bug fixes
  • Follow the existing style
  • Separate unrelated changes into multiple pull requests

See the existing issues for things to start contributing.

For bigger changes, make sure you start a discussion first by creating an issue and explaining the intended change.

Atlassian requires contributors to sign a Contributor License Agreement, known as a CLA. This serves as a record stating that the contributor is entitled to contribute the code/documentation/translation to the project and is willing to have it used in distributions and derivative works (or is willing to transfer ownership).

Prior to accepting your contributions we ask that you please follow the appropriate link below to digitally sign the CLA. The Corporate CLA is for those who are contributing as a member of an organization and the individual CLA is for those contributing as an individual.

License

Copyright (c) 2018 Atlassian and others. Apache 2.0 licensed, see LICENSE file.

com.trello.identifier

Trello

Versions

Version
0.0.2