java - Eclipse Gradle adding a classpath entry -
i'm adding classpath entry .classpath file in eclipse avoid having add manually each time run .eclipse task while add number of dependencies. need resources on path run locally.
this works,
eclipse.classpath.file { withxml { def node = it.asnode() node.appendnode('classpathentry', [kind: 'lib', path: '/some/path']) } }
this doesn't,
eclipse.classpath.file { whenmerged { classpath -> classpath.entries.add { entry -> kind: 'lib', path: '/some/path' } } }
the error is,
startup failed: build.gradle': 75: unexpected token: lib @ line 75, column 48. .entries.add { entry -> kind: 'lib', pat ^
for future reference, wrong second example?
Comments
Post a Comment