Git Product home page Git Product logo

Comments (6)

ansman avatar ansman commented on September 15, 2024

Some things to verify:

  • You've added both the API and the compiler dependencies
  • Are the imports correct (please post the entire file)

from kotshi.

nicofari avatar nicofari commented on September 15, 2024

buildscript {
repositories {
mavenCentral()
gradlePluginPortal()
}
}

plugins {
id "org.jetbrains.kotlin.jvm" version "${kotlinVersion}"
id "com.github.johnrengelman.shadow" version "7.1.2"
id "com.google.devtools.ksp" version "1.8.10-1.0.9"
}

apply plugin: "com.github.johnrengelman.shadow"
apply plugin: "java"

repositories {
mavenCentral()
}

compileKotlin.kotlinOptions.jvmTarget = "11"
compileTestKotlin.kotlinOptions.jvmTarget = "11"

sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

test {
useJUnitPlatform()
testLogging.showStandardStreams = true
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlinVersion}"
implementation platform("org.http4k:http4k-bom:${http4kVersion}")
implementation "org.http4k:http4k-core"
implementation "org.http4k:http4k-serverless-lambda"
implementation "org.http4k:http4k-cloudnative"
implementation "org.http4k:http4k-contract"
implementation("org.http4k:http4k-format-moshi") {
exclude group: "org.jetbrains.kotlin", module: "kotlin-reflect"
}
implementation("se.ansman.kotshi:api:$kotshiVersion")
ksp("se.ansman.kotshi:compiler:$kotshiVersion")

implementation "org.http4k:http4k-opentelemetry:${http4kVersion}"
implementation "org.apache.pdfbox:pdfbox:2.0.27"
implementation "de.redsix:pdfcompare:1.1.61"
implementation "net.sf.barcode4j:barcode4j:2.1"

testImplementation platform("org.junit:junit-bom:${junitVersion}")
testImplementation "org.http4k:http4k-testing-hamkrest"
testImplementation "org.junit.jupiter:junit-jupiter-api"
testImplementation "org.junit.jupiter:junit-jupiter-engine"

}

shadowJar {
manifest.attributes['Main-Class'] = 'it.multidialogo.multiprinter.MultiprinterKt'
archiveBaseName.set("multiprinter")
archiveClassifier.set(null)
archiveVersion.set(null)
mergeServiceFiles()
}

task buildZip(type: Zip) {
from compileKotlin
from processResources
into('lib') {
from configurations.compileClasspath
}
}

from kotshi.

nicofari avatar nicofari commented on September 15, 2024

in gradle.properties i have:

junitVersion=5.7.2
kotlinVersion=1.8.10
http4kVersion=4.41.0.0
kotshiVersion=2.10.2

from kotshi.

nicofari avatar nicofari commented on September 15, 2024

If I understand well (I am reading this example: https://github.com/oharaandrew314/http4k-api-on-lambda) I have to use a factory name that does not exist, it has to been generated by kotshi.
But when I issue gradlew clean assemble it does not generated in my project
while, in that project, it does ...
don't understand which task in the gradle file generates it though ...

from kotshi.

nicofari avatar nicofari commented on September 15, 2024

I've found that, if i use "gradlew clean compileKotlin" the code is generated (thought "assemble" would execute everything before)

from kotshi.

ansman avatar ansman commented on September 15, 2024

Yeah, you need to build once for the code to be generated.

from kotshi.

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.