Skip to content

Commit

Permalink
Move to Kotlin
Browse files Browse the repository at this point in the history
Moves the implementation from Java to Kotlin with as little breakage as possible.

BREAKING CHANGE: `JacksonParserFactory` had mistakenly been given the class `io.pleo.prop.guice`; it has been corrected to `io.pleo.prop.jackson`; minimum JDK version has been bumped to JDK11.
  • Loading branch information
erwinw committed Jan 20, 2022
1 parent ae812e1 commit f506e74
Show file tree
Hide file tree
Showing 90 changed files with 1,200 additions and 1,493 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/build-n-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK 8
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 8
java-version: 17
distribution: 'adopt'

- name: Gradle Build
Expand All @@ -58,11 +58,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Pin https://github.com/semantic-release/semantic-release to v17.4.7
# because https://github.com/cycjimmy/semantic-release-action currently runs on Node.js v12
# (see https://github.com/semantic-release/semantic-release/blob/master/docs/support/node-version.md)
# which is not supported by v18+
semantic_version: v17.4.7
extra_plugins: |
@semantic-release/changelog
gradle-semantic-release-plugin
Expand Down
10 changes: 10 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Global owners, applies to all files with no specific rules defined later in this file.
# By default, this should be the stewards for the Moon.

* @pleo-io/stewards-pegasus-backend

# DevOps

Dockerfile @pleo-io/operations
k8s @pleo-io/operations

43 changes: 36 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,55 @@

buildscript {
ext {
kotlinVersion = "1.6.10"
kotlinCoroutinesVersion = "1.6.0"
kotlinGradlePluginVersion = "1.6.10"

kotlinterGradleVersion = "3.8.0"
}

repositories {
mavenLocal()
mavenCentral()
}

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinGradlePluginVersion"
classpath "org.jmailen.gradle:kotlinter-gradle:$kotlinterGradleVersion"
}
}

plugins {
id "org.jetbrains.kotlin.jvm" version "$kotlinVersion" apply false
}

allprojects {
group = 'io.pleo'
}

subprojects {
apply plugin: 'java-library'
apply plugin: "kotlin"
apply plugin: 'maven-publish'
apply plugin: "org.jmailen.kotlinter"

sourceCompatibility = 1.8
targetCompatibility = 1.8
sourceCompatibility = 11
targetCompatibility = 11

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}

repositories {
mavenLocal()
mavenCentral()
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
kotlinOptions {
jvmTarget = "11"
javaParameters = true
languageVersion = "1.6"
}
}

dependencies {
implementation 'org.slf4j:slf4j-api:1.7.32'
implementation 'org.slf4j:slf4j-api:1.7.33'

testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:4.2.0'
Expand Down Expand Up @@ -92,5 +122,4 @@ subprojects {
}
}
}

}
236 changes: 0 additions & 236 deletions prop-all/src/test/java/io/pleo/prop/PropTest.java

This file was deleted.

This file was deleted.

0 comments on commit f506e74

Please sign in to comment.