Skip to content

Commit d738262

Browse files
authored
Merge pull request #5 from Sandro642/dev/init
Dev/init
2 parents 6fb07a6 + 99e331e commit d738262

2 files changed

Lines changed: 27 additions & 9 deletions

File tree

build.gradle.kts

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ plugins {
22
id("java")
33
application
44
id("org.openjfx.javafxplugin") version "0.0.13"
5+
id("maven-publish") // Plugin pour la publication
56
}
67

78
group = "fr.sandro642.github"
@@ -18,7 +19,6 @@ dependencies {
1819
implementation("io.projectreactor:reactor-core:3.6.9")
1920
implementation("org.springframework.boot:spring-boot-starter-webflux:3.2.2")
2021

21-
// JavaFX (nécessaire si jamais le plugin ne les ajoute pas automatiquement)
2222
implementation("org.openjfx:javafx-controls:21")
2323
implementation("org.openjfx:javafx-fxml:21")
2424
}
@@ -29,14 +29,13 @@ javafx {
2929
}
3030

3131
application {
32-
mainClass.set("fr.sandro642.github.ConnectorAPI") // ta classe principale JavaFX
32+
mainClass.set("fr.sandro642.github.ConnectorAPI")
3333
}
3434

3535
tasks.jar {
3636
manifest {
3737
attributes["Main-Class"] = "fr.sandro642.github.ConnectorAPI"
3838
}
39-
// Inclure les dépendances dans le JAR (optionnel si tu veux un "fat JAR")
4039
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
4140
from({
4241
configurations.runtimeClasspath.get().filter { it.name.endsWith("jar") }.map { zipTree(it) }
@@ -45,4 +44,25 @@ tasks.jar {
4544

4645
tasks.test {
4746
useJUnitPlatform()
47+
}
48+
49+
publishing {
50+
repositories {
51+
maven {
52+
name = "GitHubPackages"
53+
url = uri("https://maven.pkg.github.com/sandro642/ConnectorAPI") // Remplacez par votre OWNER/REPO
54+
credentials {
55+
username = System.getenv("USERNAME")
56+
password = System.getenv("TOKEN")
57+
}
58+
}
59+
}
60+
publications {
61+
register<MavenPublication>("mavenJava") {
62+
from(components["java"])
63+
groupId = project.group.toString()
64+
artifactId = "ConnectorAPI"
65+
version = project.version.toString()
66+
}
67+
}
4868
}

src/main/java/fr/sandro642/github/utils/YamlUtils.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,11 @@ public void generateTemplateIfNotExists(ResourceType type) {
7676
if (!file.exists()) {
7777
String template =
7878
"# properties Connector API By Sandro642\n\n" +
79-
"urlPath: \"https://api.mcas-project.systemsolutiongroup.xyz/api/\"\n\n" +
79+
"urlPath: \"http://localhost:8080/api\"\n\n" +
8080
"routes:\n" +
81-
" info: \"/mcas/info/version\"\n" +
82-
" # addMoney:\n" +
83-
" # url: \"/mcas/add/money/user\"\n" +
84-
" # removeMoney:\n" +
85-
" # url: \"/mcas/remove/money/user\"\n";
81+
" #info: \"/info/version\"\n" +
82+
" #ping: \"/ping\"\n" +
83+
" #status: \"/status\"\n";
8684
try (FileWriter writer = new FileWriter(file)) {
8785
writer.write(template);
8886
} catch (IOException e) {

0 commit comments

Comments
 (0)