Skip to content
This repository was archived by the owner on Apr 20, 2022. It is now read-only.

Commit c50c6e8

Browse files
author
Florin Dornig
committed
Initial Commit
1 parent 9b5f92e commit c50c6e8

File tree

11 files changed

+41
-395
lines changed

11 files changed

+41
-395
lines changed

README.md

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# CloudNet-MongoDB
22

33
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](LICENSE)
4-
[![Discord](https://img.shields.io/discord/785956343407181824.svg)](https://discord.gg/wvcX92VyEH)
5-
[![Build Status](https://ci.vironlab.eu/job/Vextension/badge/icon)](https://ci.vironlab.eu/job/CloudNet-MongoDB/)
64

75
---
86

@@ -15,6 +13,10 @@ https://github.com/CloudNetService/CloudNet-v3
1513
- [MongoDB Database](https://www.mongodb.com)
1614
- [CloudNetv3 3.4.0-SNAPSHOT](https://github.com/CloudNetService/CloudNet-v3)
1715

16+
## Support
17+
18+
Discord: CodedInfinity | Flo#3842
19+
1820
## Installation
1921

2022
- Stop Cloudnet
@@ -36,10 +38,3 @@ If you use Docker you can choose the following environment variable instead of c
3638
- CLOUDNET_MONGODB_DATABASE
3739
- CLOUDNET_MONGODB_AUTHMECHANISM
3840
- CLOUDNET_MONGODB_AUTHDB
39-
40-
<div align="center">
41-
<h1 style="color:#154444">Other Links:</h1>
42-
<a style="color:#00ff00" target="_blank" href="https://github.com/VironLab"><img src="https://img.shields.io/github/followers/VironLab?label=GitHub%20Followers&logo=GitHub&logoColor=%23ffffff&style=flat-square"></img></a>
43-
<a style="color:#00ff00" target="_blank" href="https://discord.gg/wvcX92VyEH"><img src="https://img.shields.io/discord/785956343407181824?label=vironlab.eu%20Discord&logo=Discord&logoColor=%23ffffff&style=flat-square"></img></a>
44-
<a style="color:#00ff00" target="_blank" href="https://www.paypal.com/paypalme/depascaldc"><img src="https://img.shields.io/static/v1?label=Donate%20Via%20Paypal&message=paypal&style=flat-square&logo=paypal&color=lightgrey"></img></a>
45-
</div>

build.gradle.kts

Lines changed: 24 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import Properties.group
2-
31
buildscript {
42
repositories {
53
gradlePluginPortal()
@@ -10,109 +8,66 @@ buildscript {
108
}
119
}
1210

11+
fun getCommitHash(): String = try {
12+
val runtime = Runtime.getRuntime()
13+
val process = runtime.exec("git rev-parse --short HEAD")
14+
val out = process.inputStream
15+
out.bufferedReader().readText().trim()
16+
} catch (ignored: Exception) {
17+
"unknown"
18+
}
19+
1320
//Define Plugins
1421
plugins {
1522
id("java")
1623
id("maven-publish")
1724
id("com.github.johnrengelman.shadow") version "6.1.0"
18-
kotlin("jvm") version "1.5.10"
25+
kotlin("jvm") version "1.6.10"
1926
}
2027

2128

2229
//Define Repositorys
2330
repositories {
24-
for (field in Repositories::class.java.declaredFields) {
25-
if (field.name != "INSTANCE") {
26-
println("Added Repository: " + field.get(null))
27-
maven(field.get(null))
28-
}
29-
}
31+
mavenCentral()
32+
maven("https://repo.cloudnetservice.eu/repository/releases/")
3033
}
3134

3235
//Define Version and Group
33-
group = Properties.group
34-
version = Properties.version
36+
group = "me.infinity.cloudnetmongodb"
37+
version = "2.1.0"
3538

3639

3740
//Define Dependencies for all Modules
3841
dependencies {
39-
implementation(getDependency("kotlin", "stdlib"))
40-
implementation(getDependency("kotlinx", "coroutines-core"))
41-
compileOnly(getDependency("cloudnet", "cloudnet"))
42-
implementation(getDependency("database", "mongo"))
42+
implementation("org.jetbrains.kotlin:kotlin-stdlib:1.6.10")
43+
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0")
44+
compileOnly("org.mongodb:mongodb-driver-sync:4.4.1")
45+
implementation("de.dytanic.cloudnet:cloudnet:3.4.2-RELEASE")
4346
}
4447

45-
if (System.getProperty("publishName") != null && System.getProperty("publishPassword") != null) {
46-
publishing {
47-
(components["java"] as AdhocComponentWithVariants).withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) {
48-
skip()
49-
}
50-
publications {
51-
create<MavenPublication>(project.name) {
52-
groupId = Properties.group
53-
artifactId = project.name
54-
version = Properties.version
55-
from(components.findByName("java"))
56-
pom {
57-
name.set(project.name)
58-
url.set("https://github.com/VironLab/Vextension")
59-
properties.put("inceptionYear", "2021")
60-
licenses {
61-
license {
62-
name.set("General Public License (GPL v3.0)")
63-
url.set("https://www.gnu.org/licenses/gpl-3.0.txt")
64-
distribution.set("repo")
65-
}
66-
}
67-
developers {
68-
developer {
69-
id.set("Infinity_dev")
70-
name.set("Florin Dornig")
71-
email.set("infinitydev@vironlab.eu")
72-
}
73-
}
74-
}
75-
}
76-
repositories {
77-
maven("https://repo.vironlab.eu/repository/maven-snapshot/") {
78-
this.name = "vironlab-snapshot"
79-
credentials {
80-
this.password = System.getProperty("publishPassword")
81-
this.username = System.getProperty("publishName")
82-
}
83-
}
84-
}
85-
}
86-
}
87-
}
8848
tasks {
8949

90-
test {
91-
useJUnitPlatform()
92-
}
93-
9450
//Set the Name of the Sources Jar
9551
kotlinSourcesJar {
96-
archiveFileName.set("${project.name}-${Properties.version}-${getCommitHash()}-sources.jar")
52+
archiveFileName.set("${project.name}-${project.version}-${getCommitHash()}-sources.jar")
9753
doFirst {
9854
//Set Manifest
9955
manifest {
10056
attributes["Implementation-Title"] = project.name
10157
attributes["Implementation-Version"] = findProperty("version").toString()
10258
attributes["Specification-Version"] = findProperty("version").toString()
103-
attributes["Implementation-Vendor"] = "VironLab.eu"
59+
attributes["Implementation-Vendor"] = "Florin Dornig"
10460
attributes["Built-By"] = System.getProperty("user.name")
10561
attributes["Build-Jdk"] = System.getProperty("java.version")
10662
attributes["Created-By"] = "Gradle ${gradle.gradleVersion}"
107-
attributes["VironLab-AppId"] = "cloudnet_mongodb"
10863
attributes["Commit-Hash"] = getCommitHash()
10964
}
11065
}
11166
}
11267

11368
shadowJar {
11469
//Set the Name of the Output File
115-
archiveFileName.set("${project.name}-${Properties.version}-${getCommitHash()}-full.jar")
70+
archiveFileName.set("${project.name}-${project.version}-${getCommitHash()}-full.jar")
11671

11772
exclude("META-INF/**")
11873

@@ -122,29 +77,27 @@ tasks {
12277
attributes["Implementation-Title"] = project.name
12378
attributes["Implementation-Version"] = findProperty("version").toString()
12479
attributes["Specification-Version"] = findProperty("version").toString()
125-
attributes["Implementation-Vendor"] = "VironLab.eu"
80+
attributes["Implementation-Vendor"] = "Florin Dornig"
12681
attributes["Built-By"] = System.getProperty("user.name")
12782
attributes["Build-Jdk"] = System.getProperty("java.version")
12883
attributes["Created-By"] = "Gradle ${gradle.gradleVersion}"
129-
attributes["VironLab-AppId"] = "cloudnet_mongodb"
13084
attributes["Commit-Hash"] = getCommitHash()
13185
}
13286
}
13387
}
13488

13589
jar {
136-
archiveFileName.set("${project.name}-${Properties.version}-${getCommitHash()}.jar")
90+
archiveFileName.set("${project.name}-${project.version}-${getCommitHash()}.jar")
13791
doFirst {
13892
//Set Manifest
13993
manifest {
14094
attributes["Implementation-Title"] = project.name
14195
attributes["Implementation-Version"] = findProperty("version").toString()
14296
attributes["Specification-Version"] = findProperty("version").toString()
143-
attributes["Implementation-Vendor"] = "VironLab.eu"
97+
attributes["Implementation-Vendor"] = "Florin Dornig"
14498
attributes["Built-By"] = System.getProperty("user.name")
14599
attributes["Build-Jdk"] = System.getProperty("java.version")
146100
attributes["Created-By"] = "Gradle ${gradle.gradleVersion}"
147-
attributes["VironLab-AppId"] = "cloudnet_mongodb"
148101
attributes["Commit-Hash"] = getCommitHash()
149102
}
150103
}

buildSrc/build.gradle.kts

Lines changed: 0 additions & 17 deletions
This file was deleted.

buildSrc/src/main/kotlin/Functions.kt

Lines changed: 0 additions & 70 deletions
This file was deleted.

buildSrc/src/main/kotlin/Properties.kt

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)