跳至主要内容

博文

目前显示的是标签为“kotlin”的博文

顺手拷贝的一个 build.gradle.kts

Gradle 的 `build.gradle` 通常都是用 Groovy DSL 来编写的。随着 Kotlin 流行,Gradle 也慢慢开始支持 `build.gradle.kts`。 刚好看见一个简单的 sample,顺手放在这里 ```kotlin plugins { `java-library` "jacoco" } repositories { mavenCentral() } dependencies { implementation("jakarta.inject:jakarta.inject-api:2.0.1.MR") implementation("jakarta.ws.rs:jakarta.ws.rs-api:3.1.0") implementation("jakarta.servlet:jakarta.servlet-api:5.0.0") implementation(project(":home-made-lib")) testImplementation("org.junit.jupiter:junit-jupiter:5.8.2") testImplementation("org.mockito:mockito-core:4.5.1") testImplementation("org.eclipse.jetty:jetty-server:11.0.9") testImplementation("org.eclipse.jetty:jetty-servlet:11.0.9") } tasks.withType () { useJUnitPlatform() } java { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } ```

[Resources] Golang, Kotlin, JS and Misc

周末看的几篇文章提到了一些有用的资源,记录一下: - Golang 1. [awesome-go](https://github.com/avelino/awesome-go) 2. [Effective Go](https://go.dev/doc/effective_go) - Kotlin 1. [Coding Conventions](https://kotlinlang.org/docs/coding-conventions.html) - JavaScript 1. [Prototype Chain](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Inheritance_and_the_prototype_chain) - Web 1. [MS Restful API Guideline](https://github.com/microsoft/api-guidelines/blob/vNext/Guidelines.md) 2. [Hardening Your HTTP Security Headers](https://www.keycdn.com/blog/http-security-headers)