Skip to content

Commit 469852e

Browse files
committed
build(gradle): Setup groupez plugin for repository & publish
build(gradle): Fix group
1 parent 238ae1a commit 469852e

File tree

2 files changed

+17
-39
lines changed

2 files changed

+17
-39
lines changed

build.gradle.kts

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@ import java.util.Locale
22

33
plugins {
44
`java-library`
5-
id("com.github.johnrengelman.shadow") version "7.1.2" // Pour remplacer maven-shade-plugin
6-
`maven-publish`
5+
id("re.alwyn974.groupez.repository") version "1.0.0"
6+
id("re.alwyn974.groupez.publish") version "1.0.0"
7+
id("com.gradleup.shadow") version "9.0.0-beta11"
78
}
89

910
rootProject.extra.properties["sha"]?.let { sha ->
1011
version = sha
1112
}
1213

13-
group = "fr.maxlego08.currencies"
14+
group = "fr.traqueur.currencies"
1415
version = property("version") as String
1516

1617
extra.set("targetFolder", file("target/"))
@@ -42,6 +43,8 @@ dependencies {
4243
compileOnly("com.bencodez:votingplugin:6.17.2")
4344
compileOnly("com.github.Emibergo02:RedisEconomy:4.3.19")
4445

46+
compileOnly("fr.maxlego08.menu:zmenu-api:1.1.0.0")
47+
4548
compileOnly(files("libs/bt-api-3.14.6.jar"))
4649
compileOnly(files("libs/MySQLTokens.jar"))
4750
compileOnly(files("libs/PlayerPoints-3.2.7.jar"))
@@ -51,7 +54,6 @@ dependencies {
5154
compileOnly(files("libs/CoinsEngine-2.4.2.jar"))
5255
compileOnly(files("libs/nightcore-2.7.1.jar"))
5356
compileOnly(files("libs/RoyaleEconomyAPI.jar"))
54-
compileOnly(files("libs/zMenu-API-1.1.0.0.jar"))
5557
}
5658

5759
val targetJavaVersion = 8
@@ -98,39 +100,6 @@ tasks.withType<Jar> {
98100
}
99101
}
100102

101-
publishing {
102-
var repository = System.getProperty("repository.name", "snapshots").replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }
103-
104-
repositories {
105-
maven {
106-
name = "groupez${repository}"
107-
url = uri("https://repo.groupez.dev/${repository.lowercase()}")
108-
credentials {
109-
username = findProperty("${name}Username") as String? ?: System.getenv("MAVEN_USERNAME")
110-
password = findProperty("${name}Password") as String? ?: System.getenv("MAVEN_PASSWORD")
111-
}
112-
authentication {
113-
create<BasicAuthentication>("basic")
114-
}
115-
}
116-
}
117-
118-
publications {
119-
register<MavenPublication>("groupez${repository}") {
120-
pom {
121-
groupId = project.group as String?
122-
artifactId = rootProject.name.lowercase()
123-
version = project.version as String?
124-
125-
scm {
126-
connection = "scm:git:git://github.com/GroupeZ-dev/${rootProject.name}.git"
127-
developerConnection = "scm:git:ssh://github.com/GroupeZ-dev/${rootProject.name}.git"
128-
url = "https://github.com/GroupeZ-dev/${rootProject.name}/"
129-
}
130-
}
131-
artifact(tasks.shadowJar)
132-
// artifact(tasks.javadocJar)
133-
// artifact(tasks.sourcesJar)
134-
}
135-
}
103+
publishConfig {
104+
githubOwner = "GroupeZ-dev"
136105
}

settings.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
rootProject.name = "CurrenciesAPI"
22

3+
pluginManagement {
4+
repositories {
5+
maven {
6+
name = "groupezReleases"
7+
url = uri("https://repo.groupez.dev/releases")
8+
}
9+
gradlePluginPortal()
10+
}
11+
}

0 commit comments

Comments
 (0)