Skip to content
Open
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: 10 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,30 @@ repositories {
mavenCentral()

maven { url 'https://jitpack.io' }

maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}

dependencies {
annotationProcessor 'io.ebean:querybean-generator:12.12.1'
annotationProcessor 'io.ebean:querybean-generator:12.16.1'

implementation spigot(mcVersion)

implementation group: 'commons-io', name: 'commons-io', version: '2.10.0'

api 'io.ebean:ebean:12.12.0'
api 'io.ebean:ebean-querybean:12.12.1'
implementation 'io.ebean:ebean-migration:12.12.1'
api 'io.ebean:ebean:12.16.1'
api 'io.ebean:ebean-querybean:12.16.1'
implementation 'net.md-5:bungeecord-api:1.19-R0.1-SNAPSHOT'
implementation 'io.ebean:ebean-migration:12.16.1'
// implementation 'io.ebean:ebean-platform-all:12.16.3'

testImplementation group: 'com.h2database', name: 'h2', version: '1.4.200'

testImplementation 'org.junit.jupiter:junit-jupiter:5.8.1'
testImplementation 'org.mockito:mockito-core:3.12.4'
testImplementation 'org.assertj:assertj-core:3.21.0'
testImplementation 'io.ebean:ebean-test:12.12.1'
testImplementation 'io.ebean:ebean-test:12.16.1'
// implementation 'io.ebean:ebean-ddl-generator:12.16.1'
}

shadowJar {
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/net/silthus/ebean/EbeanWrapper.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import io.ebean.Database;
import io.ebean.DatabaseFactory;
import io.ebean.migration.AutoRunner;
import io.ebean.migration.MigrationConfig;
import io.ebean.migration.MigrationRunner;
import io.ebean.migration.auto.AutoMigrationRunner;
import org.apache.commons.io.FileUtils;

import java.io.File;
Expand Down Expand Up @@ -105,7 +102,9 @@ public Database connect() {
throw new RuntimeException("Unable to find " + driver.getIdentifier() + " driver class " + driver.getDriverClass() + " inside " + driverLocation.getAbsolutePath(), e);
}

new MigrationRunner(config.getMigrationConfig()).run();
if(config.isRunMigrations()) {
new MigrationRunner(config.getMigrationConfig()).run();
}

database = DatabaseFactory.create(config.getDatabaseConfig());

Expand Down
10 changes: 10 additions & 0 deletions src/main/java/net/silthus/ebean/EbeanWrapperBungee.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package net.silthus.ebean;

import net.md_5.bungee.api.plugin.Plugin;

public class EbeanWrapperBungee extends Plugin {

@Override
public void onLoad() {
}
}
4 changes: 4 additions & 0 deletions src/main/resources/bungee.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: EbeanWrapper
version: 1.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version should be handled by the semantic-release plugin in the update-version.sh script. But I can also add this later.

author: Silthus
main: net.silthus.ebean.EbeanWrapperBungee