Comments (6)
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.
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.
in gradle.properties i have:
junitVersion=5.7.2
kotlinVersion=1.8.10
http4kVersion=4.41.0.0
kotshiVersion=2.10.2
from kotshi.
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.
I've found that, if i use "gradlew clean compileKotlin" the code is generated (thought "assemble" would execute everything before)
from kotshi.
Yeah, you need to build once for the code to be generated.
from kotshi.
Related Issues (20)
- Investigate support for inline classes HOT 1
- all of the objects have one companion object in ram ?!!?! HOT 3
- Migrate to KSP
- Implementation documentation or sample app? HOT 5
- Kotlin 1.5 borked HOT 3
- Generated annotation not found when compiling against Java 11 HOT 10
- Alternative annotation for custom names HOT 9
- v2.9.0: Excess code generated in adapters (Kapt) HOT 4
- Possible race condition in KSP factory generation HOT 12
- 2.10.0 KSP generates non-compilable classes when nullable field with same name as class and default value HOT 4
- 2.10.1 KSP generated adapters have trouble with generic typealiases when there is a default value HOT 3
- Serialisation issue is sallowed HOT 2
- Unresolved reference: KotshiAppJsonAdapterFactory HOT 2
- Usage with JVM 11 HOT 3
- Backend Internal error HOT 5
- [Intermittent] No JsonAdapter is getting created for random response classes after migrating to ksp from kapt HOT 4
- KSP: Failed to analyze class HOT 5
- Kotshi clashing with Micronaut DI HOT 10
- Best practices in multi-modular projects HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kotshi.