Use versions that are not dependencies #553
Answered
by
jmfayard
Arc-E-Tect
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You have to use `versionFor(...)`
https://jmfayard.github.io/refreshVersions/add-dependencies/#get-the-version-from-anywhere
Le ven. 10 juin 2022 à 21:48, Iwan Eising ***@***.***> a
écrit :
… Hi,
Great plugin, it saves me a lot of manual updating my own properties file.
I was wondering how I can use the individual properties from the
versions.properties file. For example, when using JaCoCo, I want to set
the tool version to the same version as the JaCoCo dependency defined in
versions. properties, but can't get it to work.
jacoco {
toolVersion = '0.8.8'
}
When I replace it with
jacoco {
toolVersion = '$version.org.jacoco..org.jacoco.agent'
}
The value is not resolved but taken literally. I tried to load
versions.properties in my buildscript section as I did before with my own
properties file.
buildscript {
ext {
minCodeCoverage = 1.0
}
repositories {
mavenCentral()
}
apply from: "versions.properties"
dependencies {
classpath group: "org.owasp", name:"dependency-check-gradle", version:"_"
}
apply from: 'gradle/jacoco.gradle'
}
But that results in a compiler error because the #### is not accepted.
Thanks
—
Reply to this email directly, view it on GitHub
<#553>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADQFSCA6VRUOEWGRUHM4ZLVOOLXLANCNFSM5YOVWMEQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
LouisCAD
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Great plugin, it saves me a lot of manual updating my own properties file.
I was wondering how I can use the individual properties from the
versions.properties
file. For example, when using JaCoCo, I want to set the tool version to the same version as the JaCoCo dependency defined in versions. properties, but can't get it to work.When I replace it with
The value is not resolved but taken literally. I tried to load
versions.properties
in my buildscript section as I did before with my own properties file.But that results in a compiler error because the
####
is not accepted.Thanks
Beta Was this translation helpful? Give feedback.
All reactions