mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 00:38:21 +00:00
Reorganize project sources from src/main to src/main/java
This commit is contained in:
+2
-2
@@ -34,13 +34,13 @@ subprojects {
|
|||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
java {
|
java {
|
||||||
srcDirs = ['src/main']
|
srcDirs = ['src/main/java']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
test {
|
test {
|
||||||
java {
|
java {
|
||||||
srcDirs = ['src/test']
|
srcDirs = ['src/test/java']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
Vendored
+10
-11
@@ -12,14 +12,12 @@ buildscript {
|
|||||||
|
|
||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
|
|
||||||
sourceSets {
|
ext.pluginsDir = "$projectDir/src/plugins"
|
||||||
main.kotlin.srcDirs += 'src/kotlin'
|
|
||||||
main.kotlin.excludes += 'stub.kt'
|
|
||||||
main.kotlin.excludes += '**/*.kts'
|
|
||||||
|
|
||||||
|
sourceSets {
|
||||||
plugins {
|
plugins {
|
||||||
kotlin {
|
kotlin {
|
||||||
srcDir 'data/plugins'
|
srcDir "$pluginsDir"
|
||||||
exclude 'stub.kt'
|
exclude 'stub.kt'
|
||||||
exclude '**/*.kts'
|
exclude '**/*.kts'
|
||||||
}
|
}
|
||||||
@@ -42,7 +40,10 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
task('compilePluginScripts', dependsOn: [classes, pluginsClasses], type: JavaExec) {
|
task compilePluginScripts(type: JavaExec, dependsOn: [classes, pluginsClasses]) {
|
||||||
|
group = LifecycleBasePlugin.BUILD_GROUP
|
||||||
|
description = 'Compile plugin script files (.plugin.kts) to java bytecode'
|
||||||
|
|
||||||
def compilerClasspath = [
|
def compilerClasspath = [
|
||||||
configurations.compile.asPath,
|
configurations.compile.asPath,
|
||||||
configurations.runtime.asPath,
|
configurations.runtime.asPath,
|
||||||
@@ -50,17 +51,15 @@ task('compilePluginScripts', dependsOn: [classes, pluginsClasses], type: JavaExe
|
|||||||
sourceSets.main.runtimeClasspath.asPath
|
sourceSets.main.runtimeClasspath.asPath
|
||||||
]
|
]
|
||||||
|
|
||||||
def inputDir = "$projectDir/data/plugins"
|
|
||||||
def outputDir = "$buildDir/plugins"
|
def outputDir = "$buildDir/plugins"
|
||||||
def manifestPath = "$buildDir/plugins/manifest.txt"
|
def manifestPath = "$buildDir/plugins/manifest.txt"
|
||||||
|
|
||||||
inputs.source inputDir
|
inputs.source "$pluginsDir"
|
||||||
outputs.dir outputDir
|
outputs.dir outputDir
|
||||||
|
|
||||||
println compilerClasspath.join(':')
|
|
||||||
classpath = sourceSets.main.compileClasspath + sourceSets.main.runtimeClasspath
|
classpath = sourceSets.main.compileClasspath + sourceSets.main.runtimeClasspath
|
||||||
main = 'org.apollo.game.plugin.kotlin.KotlinPluginCompiler'
|
main = 'org.apollo.game.plugin.kotlin.KotlinPluginCompiler'
|
||||||
args = [inputDir, outputDir, manifestPath, compilerClasspath.join(':')]
|
args = ["$pluginsDir", outputDir, manifestPath, compilerClasspath.join(':')]
|
||||||
}
|
}
|
||||||
|
|
||||||
assemble.dependsOn(compilePluginScripts)
|
assemble.dependsOn compilePluginScripts
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user