Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: maven

on:
push:
branches:
- master
pull_request:
types: [opened, labeled, unlabeled, synchronize]

permissions:
contents: read

env:
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"

jobs:
test_maven:
permissions:
checks: write # for actions/upload-artifact
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || contains(github.event.pull_request.labels.*.name, 'maven')

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17

- name: Run maven test
working-directory: ./maven-tests
run: ./mvnw -q verify
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ kotlin.mpp.applyDefaultHierarchyTemplate=false
androidBuild=false
graalBuild=false
loomBuild=false
mavenBuild=false
containerTests=false

org.gradle.jvmargs='-Dfile.encoding=UTF-8'
2 changes: 2 additions & 0 deletions maven-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build
target
Empty file added maven-tests/.mvn/jvm.config
Empty file.
Empty file added maven-tests/.mvn/maven.config
Empty file.
19 changes: 19 additions & 0 deletions maven-tests/.mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
wrapperVersion=3.3.2
distributionType=only-script
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.10/apache-maven-3.9.10-bin.zip
23 changes: 23 additions & 0 deletions maven-tests/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
plugins {
kotlin("jvm")
}
val testJavaVersion = System.getProperty("test.java.version", "21").toInt()

tasks.withType<Test> {
useJUnitPlatform()

val javaToolchains = project.extensions.getByType<JavaToolchainService>()
javaLauncher.set(javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(testJavaVersion))
})
}

dependencies {
//noinspection UseTomlInstead
implementation("com.squareup.okhttp3:okhttp:5.0.0")
implementation("com.squareup.okhttp3:logging-interceptor:5.0.0")

testImplementation(libs.junit)
testImplementation(libs.assertk)
testImplementation(libs.junit.vintage.engine)
}
259 changes: 259 additions & 0 deletions maven-tests/mvnw

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading