Yes it might be the case indeed.
I looked for possible compileOnly libs before committing. I must say I did not
find anyone clearly.
I thought about the Junit ones, but that would be testCompileOnly (needed I guess) and I found some use case in no test code but we can maybe change
that.
I want also to check javax.servlet:servlet-api
Anyway before reverting we can wait a bit to see if Valery has done some work for OOTB libs (as I asked few days ago). Else I don't understand why he
would want to push that instead of only using it in his own component/s.
Jacques
Le 20/11/2016 à 11:00, Taher Alkhateeb a écrit :
I don't think we currently have any compileOnly libs, and I would think we
would rarely ever need those.
So, I recommend removing them, but I also recommend not to introduce
anything unless it is "used" or "will very likely be used soon" (the YAGNI
principle)
On Sun, Nov 20, 2016 at 12:52 PM, Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:
Hi Taher,
I was wondering if this could not be helpful to OOTB minimise the
dependencies. I must say I have still to check which libs is compile only,
any ideas?
Jacques
Le 20/11/2016 à 10:28, Taher Alkhateeb a écrit :
Hi Jacques,
I'm not sure this is a very good idea. Gradle supports many other types of
dependencies (compile, compileOnly, testCompile, testCompileOnly,
compileClasspath, testRuntime, etc ...)
I think the two most common uses are compile and runtime (both needed and
used). Other kinds should be declared in build.gradle for plugins only
when
a need arises, otherwise this is just code bloat. I would rather only add
things when we actually need them.
On Sun, Nov 20, 2016 at 12:05 PM, <jler...@apache.org> wrote:
Author: jleroux
Date: Sun Nov 20 09:05:31 2016
New Revision: 1770539
URL: http://svn.apache.org/viewvc?rev=1770539&view=rev
Log:
Implemented: Build framework (Plugin mechanism) missing gradle
compileOnly
dependency feature
(OFBIZ-9118)
The current build framework only supports compile and runtime
dependencies
but
doesn't allow you to declare compile only dependencies which is important
for
non-transitive dependencies used only at compilation time.
Thanks: Valery Chenzo
Modified:
ofbiz/trunk/build.gradle
Modified: ofbiz/trunk/build.gradle
URL: http://svn.apache.org/viewvc/ofbiz/trunk/build.gradle?rev=
1770539&r1=1770538&r2=1770539&view=diff
============================================================
==================
--- ofbiz/trunk/build.gradle (original)
+++ ofbiz/trunk/build.gradle Sun Nov 20 09:05:31 2016
@@ -67,6 +67,8 @@ subprojects {
pluginLibsCompile
// runtime plugin libraries
pluginLibsRuntime
+ //compile-only libraries
+ pluginLibsCompileOnly
}
}
@@ -167,6 +169,7 @@ dependencies {
subprojects.each { subProject ->
compile project(path: subProject.path, configuration:
'pluginLibsCompile')
runtime project(path: subProject.path, configuration:
'pluginLibsRuntime')
+ compileOnly project(path: subProject.path, configuration:
'pluginLibsCompileOnly')
}
// libs needed for junitreport