Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module System #8

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions cloudsystem-modulefactory/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
22 changes: 22 additions & 0 deletions cloudsystem-modulefactory/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
plugins {
id("java")
kotlin("jvm") version "1.9.0"
kotlin("plugin.serialization") version "1.9.0"
}

group = "tech.marlonr"
version = "1.0-SNAPSHOT"

repositories {
mavenCentral()
}

dependencies {
implementation("org.projectlombok:lombok:1.18.26")
implementation("org.jetbrains:annotations:24.0.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.0-RC")
}

tasks.test {
useJUnitPlatform()
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package tech.marlonr.cloudsystem.modulefactory;

public abstract class AbstractCloudModule {

abstract void startup();
abstract void shutdown();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package tech.marlonr.cloudsystem.modulefactory

import java.io.File

class ModuleFactory(
private val moduleFolder: File
) {
fun initialize() {
if (!moduleFolder.exists()) moduleFolder.mkdirs()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package tech.marlonr.cloudsystem.modulefactory.models

import kotlinx.serialization.Serializable

@Serializable
data class CloudModuleConfig(
val name: String,
val version: String,
val authors: List<String>,
val mainClass: String
)
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ include("cloudsystem-api")
include("cloudsystem-manager")
include("cloudsystem-node")
include("cloudsystem-library")
include("cloudsystem-modulefactory")
Loading