-
Convert Maven build to gradle
gradle init
-
Initialise new project folder structure (Java example)
gradle init --type java-library
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// imports a couple of java tasks | |
apply plugin: "java" | |
// List available tasks in the shell | |
> gradle tasks | |
// A Closure that configures the sourceSets Task | |
// Sets the main folder as Source folder (where the compiler is looking up the .java files) | |
sourceSets { | |
main.java.srcDir "src/main" |
Kotlin language website is at https://kotlinlang.org.
All the codes here can be copied and run on Kotlin online editor.
- You do not need
;
to break statements. - Comments are similar to Java or C#,
/* This is comment */
for multi line comments and// for single line comment
.