Skip to content

Commit

Permalink
preparation for 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuth committed Oct 5, 2023
1 parent e59a726 commit fa8cc20
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 27 deletions.
31 changes: 7 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ The [CupsClient](https://github.com/gmuth/ipp-client-kotlin/blob/master/src/main
supports printer lookup by queue name.
Repository [ipp-samples](https://github.com/gmuth/ipp-samples) contains examples how to use jmDNS.

```
implementation("de.gmuth:ipp-client:3.0")
```
### [IppPrinter](https://github.com/gmuth/ipp-client-kotlin/blob/master/src/main/kotlin/de/gmuth/ipp/client/IppPrinter.kt) and [IppJob](https://github.com/gmuth/ipp-client-kotlin/blob/master/src/main/kotlin/de/gmuth/ipp/client/IppJob.kt)

```kotlin
Expand Down Expand Up @@ -139,7 +142,7 @@ if (defaultPrinter.hasCapability(Capability.CanPrintInColor)) {
}

// get canceled jobs and save documents
cupsClient.getJobsAndSaveDocuments(IppWhichJobs.Canceled)
cupsClient.getJobsAndSaveDocuments(WhichJobs.Canceled)

```

Expand Down Expand Up @@ -172,7 +175,7 @@ now implemented by StdoutHandler and SimpleClassNameFormatter.
I moved all of my custom logging code to it's own
repository [logging-kotlin](https://github.com/gmuth/logging-kotlin/tree/main/src/main/kotlin/de/gmuth/log).

## Build
## Build sources

To build the jar make sure you have JDK 11 installed.
The default tasks build the jar in `build/libs`.
Expand All @@ -183,37 +186,19 @@ To install the artifact to your local maven repository run

./gradlew publishToMavenLocal

This software has **no dependencies** to
The build produces the jar, sources and javadoc artifacts. This software has **no dependencies** to
[javax.print](https://docs.oracle.com/javase/7/docs/technotes/guides/jps/),
[CUPS](https://www.cups.org) or
[ipptool](https://www.cups.org/doc/man-ipptool.html).
Operation has mostly been tested for target `jvm`. Android is supported since v1.6.

## Artifact coordinates

The build produces the jar, sources and javadoc artifacts. They are available at
[maven central repository](https://central.sonatype.com/namespace/de.gmuth).

- group: gmuth.de
- artifact: ipp-client
- version: 3.0

Add dependency:

```
implementation("de.gmuth:ipp-client:3.0")
```

## Source packages

Package
[`de.gmuth.ipp.core`](https://github.com/gmuth/ipp-client-kotlin/tree/master/src/main/kotlin/de/gmuth/ipp/core)
contains the usual
[encoding](https://github.com/gmuth/ipp-client-kotlin/blob/master/src/main/kotlin/de/gmuth/ipp/core/IppOutputStream.kt)
and
[decoding](https://github.com/gmuth/ipp-client-kotlin/blob/master/src/main/kotlin/de/gmuth/ipp/core/IppInputStream.kt)
operations. RFC 8010 is fully supported.

Package
[`de.gmuth.ipp.client`](https://github.com/gmuth/ipp-client-kotlin/tree/master/src/main/kotlin/de/gmuth/ipp/client)
contains the
Expand All @@ -222,9 +207,7 @@ and implementations of higher level IPP objects like
[IppPrinter]((https://github.com/gmuth/ipp-client-kotlin/blob/master/src/main/kotlin/de/gmuth/ipp/client/IppPrinter.kt)),
[IppJob]((https://github.com/gmuth/ipp-client-kotlin/blob/master/src/main/kotlin/de/gmuth/ipp/client/IppJob.kt)),
[IppSubscription]((https://github.com/gmuth/ipp-client-kotlin/blob/master/src/main/kotlin/de/gmuth/ipp/client/IppSubscription.kt)) and
[IppEventNotification]((https://github.com/gmuth/ipp-client-kotlin/blob/master/src/main/kotlin/de/gmuth/ipp/client/IppEventNotification.kt))

## No Multiplatform support
[IppEventNotification]((https://github.com/gmuth/ipp-client-kotlin/blob/master/src/main/kotlin/de/gmuth/ipp/client/IppEventNotification.kt)).

IPP is based on the exchange of binary messages via HTTP.
For reading and writing binary data
Expand Down
13 changes: 10 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins {
}

group = "de.gmuth"
version = "3.0-SNAPSHOT"
version = "3.0"

repositories {
mavenCentral()
Expand Down Expand Up @@ -43,17 +43,19 @@ defaultTasks("assemble")
// }
//}

val javaVersion = "1.8"

tasks.compileKotlin {
kotlinOptions {
// If 1.6 is required you also have to configure gradle plugin org.jetbrains.kotlin.jvm version 1.6
jvmTarget = "1.8"
jvmTarget = javaVersion
}
}

// avoid warnings "jvm target compatibility should be set to the same Java version."
tasks.compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
jvmTarget = javaVersion
}
}

Expand All @@ -62,6 +64,11 @@ tasks.compileJava {
targetCompatibility = tasks.compileKotlin.get().kotlinOptions.jvmTarget
}

tasks.compileTestJava {
sourceCompatibility = tasks.compileTestKotlin.get().kotlinOptions.jvmTarget
targetCompatibility = tasks.compileTestKotlin.get().kotlinOptions.jvmTarget
}

//tasks.withType<Jar> {
// archiveBaseName.set("ipp-client")
// archiveClassifier.set("")
Expand Down

0 comments on commit fa8cc20

Please sign in to comment.