removed instance specific modules from code base

fixed user experience object not being created
removed top module, because it does not serve a purpose anymore
This commit is contained in:
Sheldan
2020-06-06 16:22:43 +02:00
parent d14e917329
commit a577932c42
11 changed files with 40 additions and 222 deletions

View File

@@ -23,7 +23,7 @@ jobs:
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B install --file pom.xml
run: mvn -B install --file abstracto-application/pom.xml
- name: Setup sonarqube
uses: warchant/setup-sonar-scanner@v1
- name: Run sonarqube

View File

@@ -15,9 +15,9 @@ jobs:
java-version: 1.8
- name: Load current version
id: version
run: echo "::set-output name=version::$(mvn -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)"
run: echo "::set-output name=version::$(mvn --file abstracto-application/pom.xml -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive exec:exec)"
- name: Publish to GitHub Packages
run: mvn -B deploy -P documentation -Dmaven.wagon.http.pool=false -DskipTests=true
run: mvn --file abstracto-application/pom.xml -B deploy -P documentation -Dmaven.wagon.http.pool=false -DskipTests=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install SSH Client

View File

@@ -72,6 +72,7 @@ public class UserExperienceManagementServiceBean implements UserExperienceManage
.builder()
.experience(experience)
.messageCount(messageCount)
.experienceGainDisabled(false)
.user(user)
.id(user.getUserInServerId())
.currentLevel(startingLevel)

View File

@@ -4,9 +4,11 @@ import dev.sheldan.abstracto.core.models.database.AConfig;
import dev.sheldan.abstracto.core.models.database.AServer;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.QueryHints;
import org.springframework.stereotype.Repository;
import javax.persistence.QueryHint;
@Repository
public interface ConfigRepository extends JpaRepository<AConfig, Long> {
@QueryHints(@QueryHint(name = org.hibernate.annotations.QueryHints.CACHEABLE, value = "true"))

View File

@@ -1,6 +1,6 @@
{
"title": {
"title": "<#include "posttarget_embed_title">""
"title": "<#include "posttarget_embed_title">"
},
"color" : {
"r": 200,

View File

@@ -1,95 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>abstracto-application</artifactId>
<groupId>dev.sheldan.abstracto</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<artifactId>executable</artifactId>
<properties>
<start-class>dev.sheldan.abstracto.Application</start-class>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.core</groupId>
<artifactId>core-impl</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.templating</groupId>
<artifactId>templating-impl</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.templating</groupId>
<artifactId>template-config</artifactId>
<version>${project.version}</version>
</dependency>
<!-- modules containing commands -->
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>moderation-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>modmail-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>utility-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.modules</groupId>
<artifactId>experience-tracking-impl</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>dev.sheldan.abstracto.scheduling</groupId>
<artifactId>scheduling-impl</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@@ -1,36 +0,0 @@
package dev.sheldan.abstracto;
import dev.sheldan.abstracto.core.service.Startup;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.freemarker.FreeMarkerAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@SpringBootApplication
@EnableAutoConfiguration(exclude = { FreeMarkerAutoConfiguration.class })
@ComponentScan(basePackages = {"dev.sheldan.abstracto"})
@EnableCaching
@EnableAsync
@EnableTransactionManagement
public class Application implements CommandLineRunner {
@Autowired
private Startup startup;
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Override
public void run(String... args) throws Exception {
startup.startBot();
}
}

View File

@@ -6,18 +6,19 @@
<packaging>pom</packaging>
<parent>
<groupId>dev.sheldan.abstracto</groupId>
<artifactId>abstracto</artifactId>
<version>1.0-SNAPSHOT</version>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.5.RELEASE</version>
<relativePath/>
</parent>
<groupId>dev.sheldan.abstracto</groupId>
<artifactId>abstracto-application</artifactId>
<version>1.0-SNAPSHOT</version>
<modules>
<module>test-commons</module>
<module>core</module>
<module>executable</module>
<module>templating</module>
<module>abstracto-modules</module>
<module>scheduling</module>
@@ -27,8 +28,36 @@
<module>coverage</module>
</modules>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/Sheldan/abstracto</url>
</repository>
</distributionManagement>
<scm>
<url>https://maven.pkg.github.com/Sheldan/abstracto</url>
</scm>
<repositories>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>https://jcenter.bintray.com</url>
</repository>
</repositories>
<properties>
<maven.build.timestamp.format>yyyy/MM/dd HH:mm</maven.build.timestamp.format>
<jda.version>4.1.1_155</jda.version>
<jda.utilities.version>3.0.3</jda.utilities.version>
<asciidoctor.maven.plugin.version>2.0.0-RC.1</asciidoctor.maven.plugin.version>
<asciidoctorj.pdf.version>1.5.3</asciidoctorj.pdf.version>
<asciidoctorj.version>2.3.0</asciidoctorj.version>
<jruby.version>9.2.11.1</jruby.version>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>
<build>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>dev.sheldan.abstracto</groupId>
<artifactId>abstracto</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>database</artifactId>
</project>

View File

@@ -1,11 +0,0 @@
version: '3.1'
services:
db:
image: postgres
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: abstracto
POSTGRES_USER: abstracto

57
pom.xml
View File

@@ -1,57 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.5.RELEASE</version>
<relativePath/>
</parent>
<groupId>dev.sheldan.abstracto</groupId>
<artifactId>abstracto</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<jda.version>4.1.1_155</jda.version>
<jda.utilities.version>3.0.3</jda.utilities.version>
<asciidoctor.maven.plugin.version>2.0.0-RC.1</asciidoctor.maven.plugin.version>
<asciidoctorj.pdf.version>1.5.3</asciidoctorj.pdf.version>
<asciidoctorj.version>2.3.0</asciidoctorj.version>
<jruby.version>9.2.11.1</jruby.version>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
</properties>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/Sheldan/abstracto</url>
</repository>
</distributionManagement>
<scm>
<url>https://maven.pkg.github.com/Sheldan/abstracto</url>
</scm>
<modules>
<module>abstracto-application</module>
<module>database</module>
</modules>
<repositories>
<repository>
<id>jcenter</id>
<name>jcenter-bintray</name>
<url>https://jcenter.bintray.com</url>
</repository>
</repositories>
</project>