Skip to content
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
15 changes: 7 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
.gradle
!gradle-wrapper.jar
build
target/
pom.xml.tag
pom.xml.releaseBackup
Expand All @@ -20,7 +17,7 @@ buildNumber.properties
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
Expand Down Expand Up @@ -72,9 +69,11 @@ Temporary Items
.classpath
.project
.settings/
.apt_generated_tests/
.apt_generated/
.factorypath
.env
.secrets.env
bin/
.gradle/
build/
bin/
*.pom.xml
modules/
!gradle-wrapper.jar
99 changes: 71 additions & 28 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,69 +1,112 @@
import org.apache.tools.ant.filters.ReplaceTokens
import org.apache.tools.ant.filters.ReplaceTokens

plugins {
id 'java'
id 'java' // Remove once migration is finished
id 'org.jetbrains.kotlin.jvm' version '1.6.20'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'org.jetbrains.dokka' version '1.6.10'
}

group 'xyz.theprogramsrc'
version '3.18.0'
version '4.0.0'
description 'Secure your users and server.'

repositories{
mavenCentral()
mavenLocal()

maven { url 'https://repo.theprogramsrc.xyz/repository/maven-public/' }
maven { url 'https://repo.theprogramsrc.xyz/repository/simplecoreapi-modules/' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
maven { url 'https://oss.sonatype.org/content/repositories/releases/' }
maven { url 'https://oss.sonatype.org/content/groups/public/' }
maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' }
maven { url 'https://repo.codemc.org/repository/maven-public' }
maven { url 'https://repo.extendedclip.com/content/repositories/placeholderapi/' }
maven { url 'https://repo.codemc.org/repository/maven-public/' }
maven { url 'https://jitpack.io/' }
}

// Versions
def exposedVersion = "0.38.1"

dependencies {
implementation 'xyz.theprogramsrc:supercoreapi:5.3.4-SNAPSHOT'

compileOnly 'org.apache.logging.log4j:log4j-core:2.17.1'
compileOnly 'org.spigotmc:spigot-api:1.17.1-R0.1-SNAPSHOT'
compileOnly 'net.md-5:bungeecord-api:1.17-R0.1-SNAPSHOT'
compileOnly 'me.clip:placeholderapi:2.10.9'
}
compileOnly 'xyz.theprogramsrc:supercoreapi:5.3.4-SNAPSHOT' // Remove depend once the migration is finished!

processResources {
filter ReplaceTokens, tokens: [name: rootProject.name, version: project.version.toString(), description: project.description]
}
/* Kotlin and Minecraft */
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.6.20'
compileOnly 'org.spigotmc:spigot-api:1.18.1-R0.1-SNAPSHOT'
compileOnly 'net.md-5:bungeecord-api:1.18-R0.1-SNAPSHOT'

sourceCompatibility = 1.8
targetCompatibility = 1.8
/* SimpleCoreAPI */
compileOnly 'xyz.theprogramsrc:simplecoreapi:0.3.4-SNAPSHOT'
compileOnly 'xyz.theprogramsrc:commandsmodule:0.1.0-SNAPSHOT'
compileOnly 'xyz.theprogramsrc:filesmodule:0.1.1-SNAPSHOT'
compileOnly 'xyz.theprogramsrc:tasksmodule:0.1.0-SNAPSHOT'
compileOnly 'xyz.theprogramsrc:translationsmodule:0.1.5-SNAPSHOT'
compileOnly 'xyz.theprogramsrc:dependencydownloadermodule:0.1.1-SNAPSHOT'
compileOnly 'xyz.theprogramsrc:uismodule:0.1.1-SNAPSHOT'
compileOnly 'xyz.theprogramsrc:networkingmodule:0.1.0-SNAPSHOT'
compileOnly 'xyz.theprogramsrc:loggingmodule:0.2.1-SNAPSHOT'

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}

tasks.withType(Copy) {
duplicatesStrategy = 'include'
/* DataBase */
compileOnly "org.jetbrains.exposed:exposed-core:$exposedVersion"
compileOnly "org.jetbrains.exposed:exposed-dao:$exposedVersion"
compileOnly "org.jetbrains.exposed:exposed-jdbc:$exposedVersion"
compileOnly "org.jetbrains.exposed:exposed-java-time:$exposedVersion"
compileOnly 'mysql:mysql-connector-java:8.0.28'
compileOnly 'org.xerial:sqlite-jdbc:3.36.0.3'


/* Hashing */
implementation 'at.favre.lib:bcrypt:0.9.0'

/* Extras */
compileOnly 'me.clip:placeholderapi:2.10.9'
}

tasks.withType(Jar) {
duplicatesStrategy = 'include'
processResources {
filter ReplaceTokens, tokens: [name: rootProject.name, version: project.version.toString(), description: project.description]
}

shadowJar {
relocate 'xyz.theprogramsrc.supercoreapi', 'xyz.theprogramsrc.superauth.supercoreapi'
// relocate 'org.apache.logging.log4j', 'xyz.theprogramsrc.superauth.logging'
mergeServiceFiles()
exclude('**/*.kotlin_metadata')
exclude('**/*.kotlin_builtins')

archiveBaseName.set('SuperAuth')
archiveClassifier.set('')
archiveVersion.set('')
}

minimize()
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withSourcesJar()
}

sourceSets.main.java.srcDir 'src/main/java'
sourceSets.main.resources.srcDir 'src/main/resources'
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}

tasks.withType(Jar) {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

tasks.withType(Copy){
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}

test {
useJUnitPlatform()
}

configurations {
testImplementation {
extendsFrom(compileOnly)
}
}

tasks.named("dokkaHtml") {
outputDirectory.set(file(project.buildDir.absolutePath + '/dokka'))
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package xyz.theprogramsrc.superauth.api;
package xyz.theprogramsrc.superauth_v3.api;

import xyz.theprogramsrc.superauth.global.hashing.HashingMethod;
import xyz.theprogramsrc.superauth.global.users.User;
import xyz.theprogramsrc.superauth.global.users.UserStorage;
import xyz.theprogramsrc.superauth.spigot.storage.AuthSettings;
import xyz.theprogramsrc.superauth_v3.global.hashing.HashingMethod;
import xyz.theprogramsrc.superauth_v3.global.users.User;
import xyz.theprogramsrc.superauth_v3.global.users.UserStorage;
import xyz.theprogramsrc.superauth_v3.spigot.storage.AuthSettings;

public class SuperAuthAPIEvent {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package xyz.theprogramsrc.superauth.api;
package xyz.theprogramsrc.superauth_v3.api;

public interface SuperAuthAPIHandler {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package xyz.theprogramsrc.superauth.api.actions;
package xyz.theprogramsrc.superauth_v3.api.actions;

import org.bukkit.entity.Player;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package xyz.theprogramsrc.superauth_v3.api.auth;

import xyz.theprogramsrc.superauth_v3.api.SuperAuthAPIEvent;
import xyz.theprogramsrc.superauth_v3.global.users.UserStorage;
import xyz.theprogramsrc.superauth_v3.spigot.storage.AuthSettings;

public class SuperAuthAfterCaptchaEvent extends SuperAuthAPIEvent {

public SuperAuthAfterCaptchaEvent(AuthSettings authSettings, UserStorage userStorage, String user) {
super(authSettings, userStorage, user);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package xyz.theprogramsrc.superauth_v3.api.auth;

import xyz.theprogramsrc.superauth_v3.api.SuperAuthAPIEvent;
import xyz.theprogramsrc.superauth_v3.global.users.UserStorage;
import xyz.theprogramsrc.superauth_v3.spigot.storage.AuthSettings;

public class SuperAuthAfterLoginEvent extends SuperAuthAPIEvent {

public SuperAuthAfterLoginEvent(AuthSettings authSettings, UserStorage userStorage, String user) {
super(authSettings, userStorage, user);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package xyz.theprogramsrc.superauth_v3.api.auth;

import xyz.theprogramsrc.superauth_v3.api.SuperAuthAPIEvent;
import xyz.theprogramsrc.superauth_v3.global.users.UserStorage;
import xyz.theprogramsrc.superauth_v3.spigot.storage.AuthSettings;

public class SuperAuthAfterRegisterEvent extends SuperAuthAPIEvent {

public SuperAuthAfterRegisterEvent(AuthSettings authSettings, UserStorage userStorage, String user) {
super(authSettings, userStorage, user);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package xyz.theprogramsrc.superauth_v3.api.auth;

import xyz.theprogramsrc.superauth_v3.api.SuperAuthAPIEvent;
import xyz.theprogramsrc.superauth_v3.global.users.UserStorage;
import xyz.theprogramsrc.superauth_v3.spigot.storage.AuthSettings;

public class SuperAuthBeforeCaptchaEvent extends SuperAuthAPIEvent {

public SuperAuthBeforeCaptchaEvent(AuthSettings authSettings, UserStorage userStorage, String user) {
super(authSettings, userStorage, user);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package xyz.theprogramsrc.superauth_v3.api.auth;

import xyz.theprogramsrc.superauth_v3.api.SuperAuthAPIEvent;
import xyz.theprogramsrc.superauth_v3.global.users.UserStorage;
import xyz.theprogramsrc.superauth_v3.spigot.storage.AuthSettings;

public class SuperAuthBeforeLoginEvent extends SuperAuthAPIEvent {

public SuperAuthBeforeLoginEvent(AuthSettings authSettings, UserStorage userStorage, String user) {
super(authSettings, userStorage, user);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package xyz.theprogramsrc.superauth_v3.api.auth;

import xyz.theprogramsrc.superauth_v3.api.SuperAuthAPIEvent;
import xyz.theprogramsrc.superauth_v3.global.users.UserStorage;
import xyz.theprogramsrc.superauth_v3.spigot.storage.AuthSettings;

public class SuperAuthBeforeRegisterEvent extends SuperAuthAPIEvent {

public SuperAuthBeforeRegisterEvent(AuthSettings authSettings, UserStorage userStorage, String user) {
super(authSettings, userStorage, user);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package xyz.theprogramsrc.superauth_v3.api.others;

import xyz.theprogramsrc.superauth_v3.api.SuperAuthAPIEvent;
import xyz.theprogramsrc.superauth_v3.global.users.UserStorage;
import xyz.theprogramsrc.superauth_v3.spigot.storage.AuthSettings;

public class UserPasswordChangeEvent extends SuperAuthAPIEvent {
public UserPasswordChangeEvent(AuthSettings authSettings, UserStorage userStorage, String user) {
super(authSettings, userStorage, user);
}
}
Loading