Hello world app
This commit is contained in:
commit
16b8315b7e
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"java.configuration.updateBuildConfiguration": "interactive"
|
||||
}
|
46
app/build.gradle
Normal file
46
app/build.gradle
Normal file
@ -0,0 +1,46 @@
|
||||
/*
|
||||
* This file contains a sample Java application project.
|
||||
*/
|
||||
|
||||
plugins {
|
||||
// Apply the application plugin to add support for building a CLI application in Java.
|
||||
id 'application'
|
||||
}
|
||||
|
||||
repositories {
|
||||
// Maven Central for core dependencies
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
|
||||
version = '1.0.0'
|
||||
group = "com.elitemastereric"
|
||||
archivesBaseName = "helloworld"
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
|
||||
dependencies {
|
||||
implementation "com.google.guava:guava:21.0"
|
||||
}
|
||||
|
||||
application {
|
||||
// Define the main class for the application.
|
||||
mainClass = 'com.elitemastereric.helloworld.Launch'
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
// Define main class for use with java -jar
|
||||
attributes(
|
||||
'Main-Class': application.mainClass
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
task buildAndCopy(type: Copy) {
|
||||
group 'build'
|
||||
dependsOn 'assemble'
|
||||
from "build/libs/"
|
||||
into "../run/"
|
||||
}
|
@ -0,0 +1,8 @@
|
||||
package com.elitemastereric.helloworld;
|
||||
|
||||
public class Launch {
|
||||
public static void main(String[] args) {
|
||||
Main main = new Main();
|
||||
main.execute();
|
||||
}
|
||||
}
|
17
app/src/main/java/com/elitemastereric/helloworld/Main.java
Normal file
17
app/src/main/java/com/elitemastereric/helloworld/Main.java
Normal file
@ -0,0 +1,17 @@
|
||||
package com.elitemastereric.helloworld;
|
||||
|
||||
public class Main {
|
||||
public Main() {}
|
||||
|
||||
public void execute() {
|
||||
System.out.println(getGreeting());
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns a greeting.
|
||||
* This is the function which will act as the target of our Mixin.
|
||||
*/
|
||||
public String getGreeting() {
|
||||
return "Hello World!";
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
This is the app which is the target for the mod loader.
|
Loading…
Reference in New Issue
Block a user