mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 07:30:24 +00:00
Gradle fixes to fix build [stage]
This commit is contained in:
parent
9beb96688e
commit
5fcafc866b
10 changed files with 54 additions and 55 deletions
|
@ -1,6 +1,6 @@
|
|||
package io.xpipe.api.test;
|
||||
|
||||
import io.xpipe.beacon.BeaconDaemonController;
|
||||
import io.xpipe.beacon.test.BeaconDaemonController;
|
||||
import io.xpipe.core.util.XPipeDaemonMode;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package io.xpipe.api.test;
|
||||
|
||||
import io.xpipe.beacon.BeaconDaemonController;
|
||||
import io.xpipe.beacon.test.BeaconDaemonController;
|
||||
import io.xpipe.core.util.XPipeDaemonMode;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
|
|
@ -19,6 +19,9 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.hamcrest:hamcrest:2.2'
|
||||
compileOnly 'org.junit.jupiter:junit-jupiter-api:5.10.2'
|
||||
compileOnly 'org.junit.jupiter:junit-jupiter-params:5.10.2'
|
||||
api project(':core')
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package io.xpipe.beacon;
|
||||
package io.xpipe.beacon.test;
|
||||
|
||||
import io.xpipe.beacon.BeaconClient;
|
||||
import io.xpipe.beacon.BeaconServer;
|
||||
import io.xpipe.core.util.XPipeDaemonMode;
|
||||
import io.xpipe.core.util.XPipeInstallation;
|
||||
|
|
@ -1,22 +1,15 @@
|
|||
package io.xpipe.app.test;
|
||||
package io.xpipe.beacon.test;
|
||||
|
||||
import io.xpipe.app.core.AppProperties;
|
||||
import io.xpipe.app.util.XPipeSession;
|
||||
import io.xpipe.beacon.BeaconDaemonController;
|
||||
import io.xpipe.core.util.JacksonMapper;
|
||||
import io.xpipe.core.util.XPipeDaemonMode;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
public class DaemonExtensionTest extends ExtensionTest {
|
||||
public class BeaconDaemonExtensionTest {
|
||||
|
||||
@BeforeAll
|
||||
public static void setup() throws Exception {
|
||||
AppProperties.init();
|
||||
JacksonMapper.initModularized(ModuleLayer.boot());
|
||||
XPipeSession.init(UUID.randomUUID());
|
||||
BeaconDaemonController.start(XPipeDaemonMode.TRAY);
|
||||
}
|
||||
|
|
@ -4,25 +4,19 @@ import io.xpipe.beacon.exchange.*;
|
|||
import io.xpipe.beacon.exchange.cli.*;
|
||||
import io.xpipe.core.util.ProxyFunction;
|
||||
|
||||
module io.xpipe.beacon {
|
||||
open module io.xpipe.beacon {
|
||||
exports io.xpipe.beacon;
|
||||
exports io.xpipe.beacon.exchange;
|
||||
exports io.xpipe.beacon.exchange.data;
|
||||
exports io.xpipe.beacon.exchange.cli;
|
||||
|
||||
opens io.xpipe.beacon;
|
||||
opens io.xpipe.beacon.exchange;
|
||||
opens io.xpipe.beacon.exchange.data;
|
||||
opens io.xpipe.beacon.exchange.cli;
|
||||
|
||||
exports io.xpipe.beacon.util;
|
||||
|
||||
opens io.xpipe.beacon.util;
|
||||
exports io.xpipe.beacon.test;
|
||||
|
||||
requires static com.fasterxml.jackson.core;
|
||||
requires static com.fasterxml.jackson.databind;
|
||||
requires transitive io.xpipe.core;
|
||||
requires static lombok;
|
||||
requires static org.junit.jupiter.api;
|
||||
|
||||
uses MessageExchange;
|
||||
uses ProxyFunction;
|
||||
|
|
|
@ -44,7 +44,7 @@ project.tasks.withType(org.gradle.jvm.tasks.Jar).configureEach {
|
|||
apply from: "$rootDir/gradle/gradle_scripts/java.gradle"
|
||||
apply from: "$rootDir/gradle/gradle_scripts/javafx.gradle"
|
||||
apply from: "$rootDir/gradle/gradle_scripts/lombok.gradle"
|
||||
apply from: "$rootDir/gradle/gradle_scripts/junit_suite.gradle"
|
||||
apply from: "$rootDir/gradle/gradle_scripts/local_junit_suite.gradle"
|
||||
|
||||
localTest {
|
||||
dependencies {
|
||||
|
|
37
gradle/gradle_scripts/local_junit_suite.gradle
Normal file
37
gradle/gradle_scripts/local_junit_suite.gradle
Normal file
|
@ -0,0 +1,37 @@
|
|||
apply from: "$rootDir/gradle/gradle_scripts/junit.gradle"
|
||||
|
||||
testing {
|
||||
suites {
|
||||
localTest(JvmTestSuite) {
|
||||
useJUnitJupiter()
|
||||
|
||||
dependencies {
|
||||
implementation project(':core')
|
||||
implementation project(':beacon')
|
||||
implementation project(':app')
|
||||
implementation project(':base')
|
||||
implementation project()
|
||||
}
|
||||
|
||||
targets {
|
||||
all {
|
||||
testTask.configure {
|
||||
workingDir = rootDir
|
||||
|
||||
jvmArgs += ["-Xmx2g"]
|
||||
jvmArgs += jvmRunArgs
|
||||
|
||||
systemProperty 'io.xpipe.beacon.printDaemonOutput', "false"
|
||||
systemProperty 'io.xpipe.app.useVirtualThreads', "false"
|
||||
systemProperty "io.xpipe.beacon.port", "21725"
|
||||
systemProperty "io.xpipe.beacon.launchDebugDaemon", "true"
|
||||
systemProperty "io.xpipe.app.dataDir", "$projectDir/local/"
|
||||
systemProperty "io.xpipe.app.logLevel", "trace"
|
||||
systemProperty "io.xpipe.app.writeSysOut", "true"
|
||||
systemProperty "io.xpipe.app.mode", "tray"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,45 +2,12 @@ apply from: "$rootDir/gradle/gradle_scripts/junit.gradle"
|
|||
|
||||
testing {
|
||||
suites {
|
||||
localTest(JvmTestSuite) {
|
||||
useJUnitJupiter()
|
||||
|
||||
dependencies {
|
||||
implementation project(':core')
|
||||
implementation project(':beacon')
|
||||
implementation project(':app')
|
||||
implementation project(':base')
|
||||
implementation project()
|
||||
}
|
||||
|
||||
targets {
|
||||
all {
|
||||
testTask.configure {
|
||||
workingDir = rootDir
|
||||
|
||||
jvmArgs += ["-Xmx2g"]
|
||||
jvmArgs += jvmRunArgs
|
||||
|
||||
systemProperty 'io.xpipe.beacon.printDaemonOutput', "false"
|
||||
systemProperty 'io.xpipe.app.useVirtualThreads', "false"
|
||||
systemProperty "io.xpipe.beacon.port", "21725"
|
||||
systemProperty "io.xpipe.beacon.launchDebugDaemon", "true"
|
||||
systemProperty "io.xpipe.app.dataDir", "$projectDir/local/"
|
||||
systemProperty "io.xpipe.app.logLevel", "trace"
|
||||
systemProperty "io.xpipe.app.writeSysOut", "true"
|
||||
systemProperty "io.xpipe.app.mode", "tray"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
remoteTest(JvmTestSuite) {
|
||||
useJUnitJupiter()
|
||||
|
||||
dependencies {
|
||||
implementation project(':core')
|
||||
implementation project(':beacon')
|
||||
implementation project(':app')
|
||||
implementation project()
|
||||
}
|
||||
|
|
@ -5,6 +5,9 @@ extraJavaModuleInfo {
|
|||
}
|
||||
|
||||
extraJavaModuleInfo {
|
||||
module("org.apache.commons:commons-lang3", "org.apache.commons.lang3") {
|
||||
exportAllPackages()
|
||||
}
|
||||
module("de.vandermeer:asciitable", "de.vandermeer.asciitable") {
|
||||
exportAllPackages()
|
||||
requires('de.vandermeer.skb_interfaces')
|
||||
|
|
Loading…
Reference in a new issue