JetBrains/kotlin-compiler-server
حول
Server for executing kotlin code
تطوير الويب والتطبيقاتالنمو المقاس للنجوم
- خلال 24 ساعة
- ٠
- خلال 7 أيام
- ٠
- خلال 15 يومًا
- ٠
- خلال شهر
- جارٍ جمع السجل
تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.
README.md
الأصلKotlin compiler server
A REST server for compiling and executing Kotlin code. The server provides the API for Kotlin Playground library.
How to start :checkered_flag:
Simple Spring Boot application
Download Kotlin dependencies and build an executor before starting the server:
$ ./gradlew build -x test
Start the Spring Boot project. The main class: com.compiler.server.CompilerApplication
With Docker
To build the app inside a Docker container, run the following command from the project directory:
$ ./docker-image-build.sh
From Amazon lambda
Based on aws-serverless-container.
$ ./gradlew buildLambda
Getting .zip file from build/distributions.
Lambda handler: com.compiler.server.lambdas.StreamLambdaHandler::handleRequest.
Publish your Lambda function: you can follow the instructions in AWS Lambda's documentation on how to package your function for deployment.
From Kotless
Add Kotless and remove aws-serverless-container =)
API Documentation :page_with_curl:
Swagger url: http://localhost:8080/api-docs/swagger-ui/index.html
How to add your dependencies to kotlin compiler :books:
Just put whatever you need as dependencies
to build.gradle.kts via a
task called kotlinDependency:
kotlinDependency "your dependency"
CORS configuration
Set the environment variables
| ENV | Default value |
|---|---|
| ACCESS_CONTROL_ALLOW_ORIGIN_VALUE | * |
| ACCESS_CONTROL_ALLOW_HEADER_VALUE | * |
Configure logging
We use prod spring active profile to stream logs as JSON format.
You can set the spring profile by supplying -Dspring.profiles.active=prod or set env variable SPRING_PROFILES_ACTIVE to prod value.
Unsuccessful execution logs
In case of an unsuccessful execution in the standard output will be the event with INFO level:
{
"date_time": "31/Aug/2021:11:49:45 +03:00",
"@version": "1",
"message": "Code execution is complete.",
"logger_name": "com.compiler.server.service.KotlinProjectExecutor",
"thread_name": "http-nio-8080-exec-1",
"level": "INFO",
"level_value": 20000,
"hasErrors": true,
"confType": "JAVA",
"kotlinVersion": "$kotlinVersion"
}
Workflow
This section is only relevant for JetBrains employees. And includes information about working with branches and releases. You can find information about the development workflow in workflow.md.
Gradle Build Scans
Gradle Build Scans can provide insights into an Kotlin Compiler Server Build. JetBrains runs a Gradle Develocity server. that can be used to automatically upload reports.
To automatically opt in add the following to $GRADLE_USER_HOME/gradle.properties.
org.jetbrains.kotlin.compiler.server.build.scan.enabled=true
# optionally provide a username that will be attached to each report
org.jetbrains..kotlin.compiler.server.build.scan.username=John Wick
Also you need to create an access key:
./gradlew provisionDevelocityAccessKey
A Build Scan may contain identifiable information. See the Terms of Use https://gradle.com/legal/terms-of-use/.
استكشف مشاريع مشابهة ومرتبطة
جارٍ التحميل…