Share the build.gradle for example Shopping-Cart of Akka Platform Guide

I’m studying the Akka Platform Guide. Shopping Cart is the example about micro-services in this guide.

Building the project with SBT gets high latency from China. My favorite is Gradle.

With the help of @patriknw and @ignasi35, I finished the first step, thanks.

It’s build.gradle for the project shopping-cart-service of the chapter III: Create the gRPC Cart service (reference to the akka-grpc-quickstart).

plugins {
    id 'scala'
    id 'application'
    id "com.github.maiflai.scalatest" version "0.26"
    id "com.lightbend.akka.grpc.gradle" version '1.1.1-8-c5f23b67'
}

repositories {
    maven {
        url 'http://maven.aliyun.com/nexus/content/groups/public/'
    }
    maven {
        url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'
    }
    mavenCentral()
    mavenLocal()
}

dependencies {
    implementation "org.scala-lang:scala-library:2.13.0"

    implementation 'com.typesafe.akka:akka-protobuf_2.13:2.6.13'
    implementation 'com.typesafe.akka:akka-pki_2.13:2.6.13'

    // 1. Basic dependencies for a clustered application
    implementation "com.typesafe.akka:akka-stream_2.13:2.6.13"
    implementation "com.typesafe.akka:akka-cluster-typed_2.13:2.6.13"
    implementation "com.typesafe.akka:akka-cluster-sharding-typed_2.13:2.6.13"
    testImplementation "com.typesafe.akka:akka-actor-testkit-typed_2.13:2.6.13"
    testImplementation "com.typesafe.akka:akka-stream-testkit_2.13:2.6.13"
    // Akka Management powers Health Checks and Akka Cluster Bootstrapping
    implementation "com.lightbend.akka.management:akka-management_2.13:1.0.9"
    implementation "com.typesafe.akka:akka-http_2.13:10.2.3"
    implementation "com.typesafe.akka:akka-http-spray-json_2.13:10.2.3"
    implementation "com.lightbend.akka.management:akka-management-cluster-http_2.13:1.0.9"
    implementation "com.lightbend.akka.management:akka-management-cluster-bootstrap_2.13:1.0.9"
    implementation "com.lightbend.akka.discovery:akka-discovery-kubernetes-api_2.13:1.0.9"
    implementation "com.typesafe.akka:akka-discovery_2.13:2.6.13"
    // Common dependencies for logging and testing
    implementation "com.typesafe.akka:akka-slf4j_2.13:2.6.13"
    implementation "ch.qos.logback:logback-classic:1.2.3"
    testImplementation "org.scalatest:scalatest_2.13:3.1.2"
    // 2. Using gRPC and/or protobuf
    implementation "com.typesafe.akka:akka-http2-support_2.13:10.2.3"
    // 3. Using Akka Persistence
    implementation "com.typesafe.akka:akka-persistence-typed_2.13:2.6.13"
    implementation "com.typesafe.akka:akka-serialization-jackson_2.13:2.6.13"
    implementation "com.lightbend.akka:akka-persistence-jdbc_2.13:5.0.0"
    implementation "com.typesafe.akka:akka-persistence-testkit_2.13:2.6.13"
    implementation "org.postgresql:postgresql:42.2.18"
    // 4. Querying or projecting data from Akka Persistence
    implementation "com.typesafe.akka:akka-persistence-query_2.13:2.6.13"
    implementation "com.lightbend.akka:akka-projection-eventsourced_2.13:1.1.0"
    implementation "com.lightbend.akka:akka-projection-jdbc_2.13:1.1.0"
    implementation "org.scalikejdbc:scalikejdbc_2.13:3.5.0"
    implementation "org.scalikejdbc:scalikejdbc-config_2.13:3.5.0"
    implementation "com.typesafe.akka:akka-stream-kafka_2.13:2.0.6"
    testImplementation "com.lightbend.akka:akka-projection-testkit_2.13:1.1.0"
}

application {
    mainClass = 'shopping.cart.Main'
    applicationDefaultJvmArgs = [
            "-Dconfig.resource=local1.conf"
    ]
}

Thanks @Casperlet, nice job!

Have you considered pushing your code and gradle build to a Github repository? This way it’ll be easier to comment and improve on it. :-)

The project is just a skeleton of shopping cart service, event no any aggregate implemented.

And I can’t connect to GitHub yet because of the poor network, I have to say sorry now.