Sincerely Gradle Community, I have a Problem concerning Dependency Management. In my Project ‘A’ I have two Java Classes, one of them is a GUI library with the name “StandardDraw.java” and the other one is a simple object called “Enemy.java”
I uploaded the JAR Gradle produces to an Artifactory and wanted to use the two Java Classes for my Project B
In my Project B I have the file “Main.java” where I wanted to use this library and the java Object via the Artifactory.
Project B’s Build Script looks like this:
apply plugin: ‘java’ apply plugin: ‘eclipse’
repositories {
mavenRepo urls: “http://localHost.com/artifactory/experimental” }
dependencies {
compile ‘A:A:1.0.0’
runtime “A:A:1.0.0@jar”
runtime group: ‘A’, name: ‘A’, version: ‘1.0.0’, ext: ‘jar’ }
But each time I try to build I get the error:
:compileJava /Users/Mike/Workspace/B/src/main/java/projectB/Main.java:7: cannot find symbol symbol : class Enemy location: class projectB.Main
static Enemy enemy;
^ /Users/Mike/Workspace/B/src/main/java/projectB/Main.java:11: cannot find symbol symbol : variable StdDraw location: class projectB.Main
StandardDraw.setCanvasSize( WIDTH, HEIGHT);
^ …
I am still practicing with Gradle and tried the code you use in your Documentation, but I think I 'm still mixing something up.
The directory of the JAR looks like this:
A-1.0.0.jar
-
META-INF
-
- MANIFEST.MF
-
projectA
-
- Enemy.class
-
- StandardDraw.class
The Manifest of the JAR includes just this one line:
“Manifest-Version: 1.0”
Maybe I have to add something there?
I would appreciate any help!