From 7257b4b059749f73e3940f11c9206d8f2b8121b0 Mon Sep 17 00:00:00 2001 From: djmil Date: Fri, 11 Aug 2023 22:05:28 +0200 Subject: [PATCH] add dumm gradle sub project --- settings.gradle | 1 + subapp/build.gradle | 11 +++++++++++ subapp/src/main/java/employee/Employee.java | 7 +++++++ subapp/src/main/java/employee/EmployeeApp.java | 16 ++++++++++++++++ 4 files changed, 35 insertions(+) create mode 100644 subapp/build.gradle create mode 100644 subapp/src/main/java/employee/Employee.java create mode 100644 subapp/src/main/java/employee/EmployeeApp.java diff --git a/settings.gradle b/settings.gradle index 22d345b..d6bd70b 100644 --- a/settings.gradle +++ b/settings.gradle @@ -23,4 +23,5 @@ pluginManagement { rootProject.name = 'csde-cordapp-template-java' include ':workflows' include ':contracts' +include ':subapp' diff --git a/subapp/build.gradle b/subapp/build.gradle new file mode 100644 index 0000000..cb37d11 --- /dev/null +++ b/subapp/build.gradle @@ -0,0 +1,11 @@ +plugins { + id 'application' +} + +apply plugin: 'application' +mainClassName = 'employee.EmployeeApp' + +println 'This is executed during configuration phase' +task configured { + println 'The project is configured' +} diff --git a/subapp/src/main/java/employee/Employee.java b/subapp/src/main/java/employee/Employee.java new file mode 100644 index 0000000..7659a01 --- /dev/null +++ b/subapp/src/main/java/employee/Employee.java @@ -0,0 +1,7 @@ +package employee; + +public class Employee { + String name; + String emailAddress; + int yearOfBirth; +} diff --git a/subapp/src/main/java/employee/EmployeeApp.java b/subapp/src/main/java/employee/EmployeeApp.java new file mode 100644 index 0000000..610700c --- /dev/null +++ b/subapp/src/main/java/employee/EmployeeApp.java @@ -0,0 +1,16 @@ +package employee; + +public class EmployeeApp { + + public static void main(String[] args){ + Employee employee = new Employee(); + + employee.name = "John"; + employee.emailAddress = "john@baeldung.com"; + employee.yearOfBirth = 1978; + + System.out.println("Name: " + employee.name); + System.out.println("Email Address: " + employee.emailAddress); + System.out.println("Year Of Birth:" + employee.yearOfBirth); + } +} \ No newline at end of file