Skip to content
This repository has been archived by the owner on Feb 16, 2025. It is now read-only.

Commit

Permalink
Migrated project from top level repo
Browse files Browse the repository at this point in the history
  • Loading branch information
sksamuel committed Apr 24, 2021
1 parent 3d96225 commit 1adf54b
Show file tree
Hide file tree
Showing 30 changed files with 967 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true

[*]

indent_style = space
indent_size = 3
max_line_length = 120

trim_trailing_whitespace = true
insert_final_newline = true

[*.gradle.kts]
indent_size = 3
2 changes: 2 additions & 0 deletions .github/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
todo:
keyword: "// todo"
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "gradle" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
17 changes: 17 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- pinned
- security
# Label to use when marking an issue as stale
staleLabel: wontfix
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
32 changes: 32 additions & 0 deletions .github/workflows/PR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PR-Test

on:
pull_request:
paths-ignore:
- '*.md'
- '*.yml'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout the repo
uses: actions/checkout@v2

- name: Run tests
run: ./gradlew check

- name: Bundle the build report
if: failure()
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip

- name: Upload the build report
if: failure()
uses: actions/upload-artifact@master
with:
name: error-report
path: build-reports.zip

env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
49 changes: 49 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: master

on:
push:
paths-ignore:
- '*.md'
- '*.yml'
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup JDK
uses: actions/setup-java@v1
with:
java-version: '11'

- name: Run tests
run: ./gradlew check

- name: publish snapshots
run: ./gradlew publish
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: Bundle the build report
if: failure()
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip

- name: Upload the build report
if: failure()
uses: actions/upload-artifact@master
with:
name: error-report
path: build-reports.zip


env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: release

on:
workflow_dispatch:
inputs:
version:
description: "The release version"
required: true
branch:
description: "The branch to release from"
required: true
default: 'master'

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout the repo
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.inputs.branch }}

- name: deploy to sonatype
run: ./gradlew publish
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}

env:
GRADLE_OPTS: -Dorg.gradle.configureondemand=true -Dorg.gradle.parallel=false -Dkotlin.incremental=false -Dorg.gradle.jvmargs="-Xmx3g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8"
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
*.class
*.log
.idea
*.iml
.kotlintest
.gradle

target/
build/
/build/
out/
lib_managed/
src_managed/
project/boot/
project/plugins/project/
credentials.sbt
/.idea/
61 changes: 61 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import org.gradle.api.tasks.testing.logging.TestExceptionFormat

buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots/")
}
maven {
url = uri("https://plugins.gradle.org/m2/")
}
}
}

plugins {
java
`java-library`
id("java-library")
id("maven-publish")
signing
maven
`maven-publish`
kotlin("jvm").version(Libs.kotlinVersion)
}

allprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")

group = Libs.org
version = Ci.version

dependencies {
implementation(Libs.Kotest.Api)
api(Libs.TestContainers.testcontainers)
api(Libs.Coroutines.coreJvm)
}

tasks.named<Test>("test") {
useJUnitPlatform()
testLogging {
showExceptions = true
showStandardStreams = true
exceptionFormat = TestExceptionFormat.FULL
}
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "1.8"
}

repositories {
mavenLocal()
mavenCentral()
maven {
url = uri("https://oss.sonatype.org/content/repositories/snapshots")
}
}
}

apply("./publish.gradle.kts")
9 changes: 9 additions & 0 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import org.gradle.kotlin.dsl.`kotlin-dsl`

repositories {
jcenter()
}

plugins {
`kotlin-dsl`
}
18 changes: 18 additions & 0 deletions buildSrc/src/main/kotlin/Ci.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
object Ci {

// this is the version used for building snapshots
// .GITHUB_RUN_NUMBER-snapshot will be appended
private const val snapshotBase = "1.0.0"

private val githubRunNumber = System.getenv("GITHUB_RUN_NUMBER")

private val snapshotVersion = when (githubRunNumber) {
null -> "$snapshotBase-LOCAL"
else -> "$snapshotBase.${githubRunNumber}-SNAPSHOT"
}

private val releaseVersion = System.getenv("RELEASE_VERSION")

val isRelease = releaseVersion != null
val version = releaseVersion ?: snapshotVersion
}
22 changes: 22 additions & 0 deletions buildSrc/src/main/kotlin/Libs.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
object Libs {

const val kotlinVersion = "1.4.32"
const val org = "io.kotest.extensions"

object Kotest {
private const val version = "4.4.3"
const val junit5 = "io.kotest:kotest-runner-junit5-jvm:$version"
const val Api = "io.kotest:kotest-framework-api:$version"
}

object TestContainers {
private const val version = "1.15.2"
const val testcontainers = "org.testcontainers:testcontainers:$version"
}

object Coroutines {
private const val version = "1.4.3"
const val coreCommon = "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version"
const val coreJvm = "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:$version"
}
}
4 changes: 4 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#https://github.com/gradle/gradle/issues/11308
org.gradle.internal.publish.checksums.insecure=true
systemProp.org.gradle.internal.publish.checksums.insecure=true
org.gradle.parallel=true
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 1adf54b

Please sign in to comment.