# Gradle as Java Lib

**URL:** https://discuss.gradle.org/t/gradle-as-java-lib/3743
**Category:** Old Forum Archive
**Created:** [October 25, 2013, 12:07pm UTC](https://discuss.gradle.org/t/gradle-as-java-lib/3743 "2013-10-25T12:07:00Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![akhil\_shastri](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/akhil_shastri/32/773_2.png) [@akhil\_shastri](https://discuss.gradle.org/u/akhil_shastri)
#### Post date: [October 25, 2013, 12:07pm UTC](https://discuss.gradle.org/t/gradle-as-java-lib/3743/1 "2013-10-25T12:07:00Z")

</div>

Hi All,

I am new to Gradle and as per my knowledge I can maintain the dependencies,compile code,Run Tests and build the jar on command prompt.

But I want to automate Gradle Build System with my Java Code, How can I use java to say Gradle to compile/test/build a Project …?

Regards, Akhil

---

<div class="post-metadata">

### Author: ![akhil\_shastri](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/akhil_shastri/32/773_2.png) [@akhil\_shastri](https://discuss.gradle.org/u/akhil_shastri)
#### Post date: [October 25, 2013, 1:02pm UTC](https://discuss.gradle.org/t/gradle-as-java-lib/3743/2 "2013-10-25T13:02:00Z")

</div>

Got the answer…

it’s tooling API

[http://www.gradle.org/docs/current/userguide/embedding.html#sec:embedding\_introduction](http://www.gradle.org/docs/current/userguide/embedding.html#sec:embedding_introduction)
