mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-13 15:34:40 +01:00
Merge branch 'development' into api
# Conflicts: # src/main/java/emu/grasscutter/plugin/api/ServerHook.java
This commit is contained in:
75
build.gradle
75
build.gradle
@@ -6,10 +6,25 @@
|
||||
* User Manual available at https://docs.gradle.org/5.6.3/userguide/tutorial_java_projects.html
|
||||
*/
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.18'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
// Apply the java plugin to add support for Java
|
||||
id 'java'
|
||||
|
||||
// Apply the protobuf auto generator
|
||||
id 'com.google.protobuf' version "0.8.18"
|
||||
id 'idea'
|
||||
|
||||
id 'eclipse'
|
||||
|
||||
// Apply the application plugin to add support for building a CLI application
|
||||
id 'application'
|
||||
|
||||
@@ -17,6 +32,10 @@ plugins {
|
||||
id 'signing'
|
||||
}
|
||||
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
group = 'tech.xigam'
|
||||
version = '1.0.1-dev'
|
||||
|
||||
@@ -34,7 +53,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: 'lib', include: ['*.jar'])
|
||||
|
||||
|
||||
implementation group: 'org.slf4j', name: 'slf4j-api', version: '1.7.32'
|
||||
implementation group: 'ch.qos.logback', name: 'logback-core', version: '1.2.9'
|
||||
implementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.9'
|
||||
@@ -49,6 +68,12 @@ dependencies {
|
||||
|
||||
implementation group: 'org.greenrobot', name: 'eventbus-java', version: '3.3.1'
|
||||
implementation group: 'org.danilopianini', name: 'java-quadtree', version: '0.1.9'
|
||||
|
||||
implementation group: 'org.quartz-scheduler', name: 'quartz', version: '2.3.2'
|
||||
implementation group: 'org.quartz-scheduler', name: 'quartz-jobs', version: '2.3.2'
|
||||
|
||||
protobuf files('proto/')
|
||||
|
||||
}
|
||||
|
||||
application {
|
||||
@@ -125,13 +150,55 @@ publishing {
|
||||
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
|
||||
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
|
||||
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
||||
|
||||
|
||||
name = 'sonatype'
|
||||
credentials(PasswordCredentials)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
clean {
|
||||
delete protobuf.generatedFilesBaseDir
|
||||
}
|
||||
|
||||
protobuf {
|
||||
protoc {
|
||||
// The artifact spec for the Protobuf Compiler
|
||||
artifact = 'com.google.protobuf:protoc:3.18.1'
|
||||
}
|
||||
// generatedFilesBaseDir = "$projectDir/src/main/java/emu/grasscutter/net/proto/"
|
||||
generatedFilesBaseDir = "$projectDir/src/generated/"
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
proto {
|
||||
// In addition to the default 'src/main/proto'
|
||||
srcDir 'src/generated'
|
||||
}
|
||||
java {
|
||||
srcDir 'src/java'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
idea {
|
||||
module {
|
||||
// proto files and generated Java files are automatically added as
|
||||
// source dirs.
|
||||
// If you have additional sources, add them here:
|
||||
sourceDirs += file("/proto/");
|
||||
}
|
||||
}
|
||||
|
||||
eclipse {
|
||||
classpath {
|
||||
file.whenMerged { cp ->
|
||||
cp.entries.add( new org.gradle.plugins.ide.eclipse.model.SourceFolder('src/generated/main/java', null) )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signing {
|
||||
sign publishing.publications.mavenJava
|
||||
}
|
||||
@@ -140,4 +207,8 @@ javadoc {
|
||||
if(JavaVersion.current().isJava9Compatible()) {
|
||||
options.addBooleanOption('html5', true)
|
||||
}
|
||||
}
|
||||
|
||||
processResources {
|
||||
dependsOn "generateProto"
|
||||
}
|
||||
Reference in New Issue
Block a user