1
I have a number of dependencies that I now need their normal "flavor", time I need their "flavor" without Amblas.
I’ll take care of it by profiling retrolambda
enabled or not. One of my projects I need this is totalcross-functional-toolbox
. Currently, what I have is a build on gitlab-CI to publish in a private artifact repository, but I’m thinking of switching to Jitpack. What I do is currently on .gitlab-ci.yml
of the project:
archive-functional-toolbox:
script:
- ./mvnw $MAVEN_CLI_OPTS clean deploy -pl :totalcross-functional-toolbox,:totalcross-functional-toolbox-bom,:gwt-functional-toolbox-is-serializable -am
- ./mvnw $MAVEN_CLI_OPTS clean deploy -pl :totalcross-functional-toolbox,:totalcross-functional-toolbox-bom -P retrolambda
Note how, to publish the two flavors, I have run clean deploy
whether or not to enable the profile retrolambda
. This difference in flavors I put in the version. A priori, the version is 2.0.1${revision}
, if I don’t profile retrolambda
turns out that ${revision}
expands to empty string, with the profile expands to +retrolambda
.
In this case, as the Jitpack controls the life cycle, is there any way I can detect which "Flavor" is being requested to build properly? I will now require the artifact com.gilab.geosales-open-source:totalcross-functional-toolbox:2.0.1
, now the artifact com.gilab.geosales-open-source:totalcross-functional-toolbox:2.0.1+retrolambda
, how to know which artifact I am requiring to correctly generate the desired version?
For now, ignoring the fact that the sample project is a multi-module Maven project, the answer can consider only as if it were a simple Maven project