Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Include javax.annotations and auto-value profiles #37

Closed
chingor13 opened this issue May 13, 2020 · 0 comments
Closed

Include javax.annotations and auto-value profiles #37

chingor13 opened this issue May 13, 2020 · 0 comments
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@chingor13
Copy link
Contributor

chingor13 commented May 13, 2020

Figure out how to do profile activation to for specialized configs.

@chingor13 chingor13 added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label May 13, 2020
stephaniewang526 pushed a commit to googleapis/java-shared-config that referenced this issue May 19, 2020
Normally we would want to include auto-value in
java-shared-dependencies, however auto-value includes a compiler
extension and requires build configuration.

#### Dependencies

This change adds a dependencyManagement section with contains
auto-value-annotations to manage which version of
auto-value-annotations is used by projects and included in the
dependency tree.

#### Profiles

Two new profiles have been added with the necessary
configuration to include auto-value in the annotationProcessorPath
when compiling.

Auto value does not support java7 across all its artifacts
consistently and requires us to have build configuration for java7
and java8+ to deal with this fact. When we drop support for java7 the
autovalue-java7 profile can be deleted, and the jdk based activation
of autovalue-java8 can be removed.

##### Activation
Activation of each of the profiles is accomplished using a combination
of jdk version and file-exists rules. Not all modules underneath this
shared config use auto-value and thus we don't want to modify the
annotationProcessorPath for everything. This allows the use of
auto-value to be opt-in per module.

To use either autovalue-java* profile, create an empty file in the
module root named `EnableAutoValue.txt`. When the maven config is
loaded it will look for this file, and if present activate the
respective profile based on which version of java is running.

Related to: googleapis/java-shared-dependencies#37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants