Skip to content
Draft
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
1 change: 0 additions & 1 deletion .github/workflows/build-rd-kt-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
container: adoptopenjdk/openjdk11:x86_64-ubuntu-jdk-11.0.11_9
env:
GRADLE_USER_HOME: ${{ github.workspace }}/.github/gradle
TEAMCITY_VERSION: 1 # temporary; to disable cross tests
timeout-minutes: 25
steps:
- uses: actions/checkout@v2
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-rd-kt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
os: [macos-10.15, windows-2019]
env:
GRADLE_USER_HOME: ${{ github.workspace }}/.github/gradle
TEAMCITY_VERSION: 1 # temporary; to disable cross tests
timeout-minutes: 25
steps:
- uses: actions/checkout@v2
Expand Down
16 changes: 16 additions & 0 deletions .run/rd-cross debug.run.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="rd-cross debug" type="Remote">
<module name="rd.rd-cross.main" />
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="true" />
<option name="SHMEM_ADDRESS" />
<option name="HOST" value="localhost" />
<option name="PORT" value="5005" />
<option name="AUTO_RESTART" value="true" />
<RunnerSettings RunnerId="Debug">
<option name="DEBUG_PORT" value="5005" />
<option name="LOCAL" value="false" />
</RunnerSettings>
<method v="2" />
</configuration>
</component>
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ FROM adoptopenjdk/openjdk11:x86_64-ubuntu-jdk-11.0.11_9
WORKDIR /rd
COPY . .

ENV TEAMCITY_VERSION=1
RUN ./gradlew assemble
ENTRYPOINT ./gradlew build
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ To build packages locally please use: `rd-kt/rd-gen/pack.sh`

### On a local computer

Don't forget to set `TEAMCITY_VERSION=1` (temporary measure for now) before running any tests.

```console
$ ./gradlew build
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ const val junitVersion = "5.6.0"
const val sl4jVersion = "1.7.12"
const val nodeVersion = "1.3.1"

const val netCoreAppVersion = "2.1"
const val netCoreAppVersion = "3.1"
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

package com.jetbrains.rd.gradle.plugins

import com.jetbrains.rd.gradle.tasks.*
import com.jetbrains.rd.gradle.tasks.CrossTestCsTask
import com.jetbrains.rd.gradle.tasks.CrossTestTaskKt
import com.jetbrains.rd.gradle.tasks.InteropTask
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.testing.Test
import org.gradle.kotlin.dsl.*
import java.io.File

fun Project.applyCrossTest() = apply<CrossTestPlugin>()

Expand Down Expand Up @@ -48,6 +51,10 @@ class CrossTestPlugin : Plugin<Project> {
classpath += sourceSets["main"].output
classpath += configurations["compileClasspath"]
classpath += configurations["runtimeClasspath"]
classpath = classpath.minus(files(gradle.gradleHomeDir?.resolve("lib")?.listFiles()?.filter { it.name.contains("kotlin-stdlib") || it.name.contains("kotlin-reflect") } ?: listOf<File>()))

val extraArguments = project.extra["crossTestsJavaAdditionalArgs"]?.toString().orEmpty().split(' ')
jvmArgs(extraArguments)
}

fun creatingCrossTestRdTask() =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
package com.jetbrains.rd.gradle.tasks

import java.io.IOException
import java.io.ObjectInputStream
import java.io.ObjectOutputStream

/**
* Provides command line arguments for running Kotlin crosstest part
*/
open class CrossTestTaskKt : KotlinExec(), MarkedExecTask {
override val commandLineWithArgs: List<String>
get() = (super.getCommandLine() + tmpFile.absolutePath)
get() {
val action = execActionFactory.newJavaExecAction()
copyTo(action)
action.main = main
action.classpath = classpath

return action.commandLine + tmpFile.absolutePath
}

init {
main = "com.jetbrains.rd.cross.cases.${name}Kt"
Expand Down
4 changes: 3 additions & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
version=2021.3.4
deployMavenToProduction=false
deployNuGetToNuGetOrg=false
deployNuGetToInternal=false
deployNuGetToInternal=false
enableCrossTests=true
crossTestsJavaAdditionalArgs=-agentlib:jdwp=transport=dt_socket,server=n,address=HORIZON:5005,suspend=y
4 changes: 2 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ project(":rd-text").projectDir = File("rd-kt/rd-text")
include(":rd-swing")
project(":rd-swing").projectDir = File("rd-kt/rd-swing")

val TEAMCITY_VERSION = "TEAMCITY_VERSION"
val enableCrossTests = extra["enableCrossTests"]?.toString().orEmpty().let { it == "1" || it.equals("true", true) }

if (System.getenv(TEAMCITY_VERSION) == null) {
if (enableCrossTests) {
include(":rd-net")
project(":rd-net").projectDir = File("rd-net")

Expand Down