Skip to content

Commit

Permalink
Adding implementation of plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddenton committed Aug 30, 2024
1 parent 3598752 commit 03c20e6
Show file tree
Hide file tree
Showing 54 changed files with 2,704 additions and 1,119 deletions.
27 changes: 27 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true

[{*.yml,*.yaml}]
indent_size = 2

[*.md]
max_line_length = 160

[{*.html,*.htm}]
indent_size = 2
ij_continuation_indent_size = 4

[{*.kt,*.kts}]
ij_continuation_indent_size = 4
ij_kotlin_name_count_to_use_star_import = 99
ij_kotlin_name_count_to_use_star_import_for_members = 99
disabled_rules = chain-wrapping, colon-spacing, comma-spacing, comment-spacing, curly-spacing, filename, import-ordering, indent, indent_size, no-unused-imports, no-wildcard-imports, parameter-list-wrapping, range-spacing, string-template

[src/docs/*/**.kt]
max_line_length = 95
42 changes: 42 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build
on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
# required by release-tag.sh to correctly identify files changed in the last commit
fetch-depth: 2
# required by release-tag.sh to allow pushing with another credentials so other workflows are triggered
persist-credentials: false
- uses: actions/[email protected]
with:
distribution: temurin
java-version: 21
cache: gradle
- name: Cache Gradle packages
uses: actions/[email protected]
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
timeout-minutes: 15
run: ./gradlew check
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
- name: Publish Test Report
uses: mikepenz/[email protected]
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}
57 changes: 57 additions & 0 deletions .github/workflows/refresh_versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Worfklow for https://jmfayard.github.io/refreshVersions/

name: Refresh Dependencies

on:
workflow_dispatch:
schedule:
- cron: '0 7 * * 1'

jobs:
refresh-versions:
name: Check New Versions
runs-on: "ubuntu-latest"
steps:
- id: step-0
name: check-out
uses: actions/[email protected]
with:
ref: master
- id: step-1
name: setup-java
uses: actions/[email protected]
with:
distribution: temurin
java-version: 21
cache: gradle
- id: step-2
name: create-branch
uses: peterjgrainger/[email protected]
with:
branch: dependency-update
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: step-3
name: gradle refreshVersions
uses: gradle/[email protected]
with:
arguments: refreshVersions
- id: step-4
name: Commit
uses: EndBug/add-and-commit@v9
with:
author_name: GitHub Actions
author_email: [email protected]
message: Refresh versions.properties
new_branch: dependency-update
push: --force --set-upstream origin dependency-update
- id: step-5
name: Pull Request
uses: repo-sync/pull-request@v2
with:
source_branch: dependency-update
destination_branch: master
pr_title: Upgrade gradle dependencies
pr_body: '[refreshVersions](https://github.com/jmfayard/refreshVersions) has found those library updates!'
pr_draft: false
github_token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .java-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
21
37 changes: 0 additions & 37 deletions build.gradle

This file was deleted.

65 changes: 65 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import org.gradle.api.JavaVersion.VERSION_17
import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile

plugins {
kotlin("jvm")
id("org.jetbrains.intellij")
idea
}

group = "org.http4k"
version = "0.0.0"

repositories {
mavenCentral()
}

dependencies {
implementation(platform(Http4k.bom))
implementation(platform("dev.forkhandles:forkhandles-bom:_"))

implementation(Http4k.core)
implementation(Http4k.cloudnative)
implementation(Http4k.format.jackson)
implementation("dev.forkhandles:values4k:_")
implementation("dev.forkhandles:bunting4k:_")

implementation("com.google.code.gson:gson:_")
implementation(ReactiveX.rxJava3)
implementation(ReactiveX.rxJava3.rxKotlin)
implementation(Square.retrofit2)
implementation(Square.retrofit2.adapter.rxJava3)
implementation(Square.retrofit2.converter.gson)
}

tasks {
withType<KotlinJvmCompile>().configureEach {
compilerOptions {
jvmTarget.set(JVM_17)
}
}

java {
sourceCompatibility = VERSION_17
targetCompatibility = VERSION_17
}

withType<Test> {
useJUnitPlatform()
jvmArgs = listOf("--enable-preview")
}
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}


intellij {
version.set("2024.1.2")
plugins.set(listOf("gradle", "java", "org.jetbrains.kotlin"))
updateSinceUntilBuild.set(false)
}
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
kotlin.code.style=official
kotlin.stdlib.default.dependency=false
org.gradle.caching=true
org.gradle.parallel=true
org.gradle.jvmargs=-Xmx8g -Dkotlin.daemon.jvm.options=-Xmx6g -XX:MaxMetaspaceSize=1024m
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Loading

0 comments on commit 03c20e6

Please sign in to comment.