Gradle Java Plugin: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Gradle Concepts")
 
Line 2: Line 2:


* [[Gradle Concepts#Gradle_Java_Plugin|Gradle Concepts]]
* [[Gradle Concepts#Gradle_Java_Plugin|Gradle Concepts]]
=Overview=
The Java plugin adds [[Gradle Concepts#Task|tasks]] to your [[Gradle Concepts#Project|project]] which will compile and unit test your Java source code, and bundle it into a JAR file. The Java plugin is convention based. This means that the plugin defines default values for many aspects of the project, such as where the Java source files are located.  If you follow the convention in your project, you generally don’t need to do much in your build script to get a useful build. To use it, [[build.gradle]] must include:
<syntaxhighlight lang='groovy'>
apply plugin: 'java'
</syntaxhighlight>

Revision as of 00:56, 1 May 2018

Internal

Overview

The Java plugin adds tasks to your project which will compile and unit test your Java source code, and bundle it into a JAR file. The Java plugin is convention based. This means that the plugin defines default values for many aspects of the project, such as where the Java source files are located. If you follow the convention in your project, you generally don’t need to do much in your build script to get a useful build. To use it, build.gradle must include:

apply plugin: 'java'