Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
305 views
in Technique[技术] by (71.8m points)

java - Including local jar file in project at build time using gradle

I want to include enterprise.jar file of salesforce in my project at build time using gradle Could anyone help me out how to include a local jar file that exists in src/main/resources folder in my project.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This is explained in the documentation. The following should do:

dependencies {
    compile files('./src/main/resources/enterprise.jar')
}

I wouldn't put the jar in src/main/resources though. It's not a resource of your project, but a compile dependency. I would put it in a lib directory.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...