Code Monkey home page Code Monkey logo

Comments (2)

tsegismont avatar tsegismont commented on September 16, 2024 1

@jponge assigned it to you. Again, if you can it before EOW, please set the 2.0.0 milestone.

from vertx-starter.

brokenthorn avatar brokenthorn commented on September 16, 2024

My conversion of the default Gradle build script for a fresh Vert.x project, to Kotlin (tested only to pass build):

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
  java
  kotlin("jvm") version "1.3.11"
  application
  id("com.github.johnrengelman.shadow") version "4.0.3"
}

group = "ro.minifarm"
version = "1.0.0-SNAPSHOT"

repositories {
  mavenLocal()
  jcenter()
}

dependencies {
  compile(kotlin("stdlib-jdk8"))

  implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.11")

  implementation("io.vertx:vertx-core:3.6.0")
  implementation("io.vertx:vertx-jdbc-client:3.6.0")
  implementation("io.vertx:vertx-config:3.6.0")
  implementation("io.vertx:vertx-sql-common:3.6.0")
  implementation("io.vertx:vertx-auth-jwt:3.6.0")
  implementation("io.vertx:vertx-health-check:3.6.0")
  implementation("io.vertx:vertx-web:3.6.0")
  implementation("io.vertx:vertx-mail-client:3.6.0")
  implementation("io.vertx:vertx-redis-client:3.6.0")

  testImplementation("io.vertx:vertx-junit5:3.6.0")
  testRuntime("org.junit.jupiter:junit-jupiter-engine:5.2.0")
}

configure<JavaPluginConvention> {
  sourceCompatibility = JavaVersion.VERSION_1_8
}

tasks.withType<KotlinCompile> {
  kotlinOptions.jvmTarget = "1.8"
}

tasks.withType<Test> {
  useJUnitPlatform()
  testLogging {
    events("passed", "skipped", "failed")
  }
}

val mainVerticleName = "ro.minifarm.requester.MainVerticle"

tasks.withType<ShadowJar> {
  baseName = "app"
  classifier = "shadow"

  manifest {
    attributes["Main-Verticle"] = mainVerticleName
  }

  mergeServiceFiles {
    include("META-INF/services/io.vertx.core.spi.VerticleFactory")
  }
}

val watchForChange = "src/**/*"
val doOnChange = "./gradlew classes"
val mainClass = "io.vertx.core.Launcher"

application {
  mainClassName = mainClass
  applicationDefaultJvmArgs = listOf(mainVerticleName, "--redeploy=$watchForChange", "--launcher-class=$mainClassName", "--on-redeploy=$doOnChange")
}

tasks.withType<Wrapper> {
  gradleVersion = "5.0"
}

from vertx-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.