Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/renovate/gradle-8.x' into renova…
Browse files Browse the repository at this point in the history
…te/gradle-8.x
  • Loading branch information
l-1squared committed Nov 28, 2024
2 parents aa1255c + b6a4c6e commit 37787bd
Show file tree
Hide file tree
Showing 33 changed files with 85 additions and 68 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/jgiven_branch_and_pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
ANDROID: true
strategy:
matrix:
java: [ '11', '17', '19']
java: [ '17', '21']
junit: ['4.13.2']
steps:
- name: Ensure chrome is installed
Expand All @@ -27,7 +27,7 @@ jobs:
JUNIT_VERSION: ${{matrix.junit}}
run: "./gradlew -i -s check -DjunitVersion=${JUNIT_VERSION}"
- name: Run Jacoco
if: ${{matrix.java == '11' && github.ref == 'refs/heads/master' && github.head_ref == null}}
if: ${{matrix.java == '17' && github.ref == 'refs/heads/master' && github.head_ref == null}}
run: ./gradlew overallJacocoReport coveralls
- name: Upload test results html files
continue-on-error: true
Expand Down
23 changes: 17 additions & 6 deletions .github/workflows/jgiven_examples_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,21 @@ jobs:
name: test-report-example-projects
path: /home/runner/work/JGiven/JGiven/example-projects/*/build/reports/tests
if-no-files-found: ignore
- name: Test Java 11 Project
run: source scripts/source_files/helper_functions.sh && runMavenTestOnGivenProject example-projects/java11/pom.xml 1.1-t
- name: Test Java 17 Project
run: source scripts/source_files/helper_functions.sh && runMavenTestOnGivenProject example-projects/java17/pom.xml 1.1-t
- name: Test TestNG Example Project
run: source scripts/source_files/helper_functions.sh && runGradleTestOnGivenProject example-projects/testng/build.gradle 1.1-t
- uses: olafurpg/setup-scala@v14
with:
java-version: [email protected]
- name: Test Scala Example Project
run: source scripts/source_files/helper_functions.sh && runScalaTest
run: |
sudo apt-get update
sudo apt-get install apt-transport-https curl gnupg -yqq
echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list
echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list
curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo -H gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/scalasbt-release.gpg --import
sudo chmod 644 /etc/apt/trusted.gpg.d/scalasbt-release.gpg
sudo apt-get update
sudo apt-get install sbt
source scripts/source_files/helper_functions.sh && runScalaTest
- name: Upload test results html files
continue-on-error: true
if: ${{failure()}}
Expand All @@ -71,6 +77,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'adopt'
- name: Load the bash script
run: scripts/local_release_with_version.sh
- name: Run validation
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mock_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
GPG_KEY_ID: '[email protected]'
VERSION: '0.0.1-TEST'
steps:
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/[email protected]
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'
- name: Set up a server certificate
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_renovate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Checkout
uses: actions/[email protected]
- name: Renovate-dry-run
uses: renovatebot/github-action@v40.3.6
uses: renovatebot/github-action@v41.0.4
with:
configurationFile: renovate.json
token: ${{secrets.RENOVATE_TOKEN}}
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Release v2.0.0
## Breaking changes
## Backward incompatible changes
* Gradle-Plugin: The jgiven report task now forces execution of test tasks. That is, when the task jgivenTestReport is explicitly requested, for instance via the command line, the test tasks it depends on are also executed. For implementations where the jgiven task is set to finalize a test task (i.e `test.finalizedBy(jgiven)`, the behavior is unchanged.
* JGiven now requires Java 17
## Fixed issues:
* The Gradle-Plugin is now configuration-cache compliant [#1527](https://github.com/TNG/JGiven/issues/1527) (big thanks to @jjohannes for basically doing all the work)
* Various dependency updates.
* JGiven is now compatible to Gradle 9
* JGiven is now guaranteed to be compatible with Java 21

# Release v1.3.1
## Fixed issues
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ nexusStaging {

subprojects {
ext {
androidCompileSdkVersion = 33
androidCompileSdkVersion = 34
androidMinSdkVersion = 29
androidTargetSdkVersion = 32

Expand Down Expand Up @@ -219,7 +219,7 @@ configure(subprojects.findAll { !it.name.contains("android") }) {
}

java {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17
withJavadocJar()
withSourcesJar()
}
Expand Down
14 changes: 8 additions & 6 deletions example-projects/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.4.2'
classpath 'com.android.tools.build:gradle:8.5.2'
}
}

Expand All @@ -19,7 +19,8 @@ repositories {
}

android {
compileSdkVersion 33
compileSdkVersion 34
namespace 'jgiven.tngtech.com.jgiven_android.example'
defaultConfig {
applicationId "com.tngtech.jgiven.android.example"
minSdkVersion 29
Expand All @@ -36,8 +37,8 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

Expand All @@ -46,8 +47,9 @@ configurations {
}

dependencies {
implementation('androidx.appcompat:appcompat:1.6.1') {
implementation('androidx.appcompat:appcompat:1.7.0') {
exclude group: 'com.google.guava', module: 'listenablefuture'
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
}

androidTestImplementation('androidx.test.espresso:espresso-core:3.6.1', {
Expand All @@ -64,7 +66,7 @@ dependencies {
androidTestImplementation('com.tngtech.jgiven:jgiven-android:' + version)

jgivenReport 'com.tngtech.jgiven:jgiven-html5-report:' + version
jgivenReport 'org.slf4j:slf4j-simple:2.0.9'
jgivenReport 'org.slf4j:slf4j-simple:2.0.16'
}

def targetDir = 'build/reports/jgiven/json'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import jgiven.tngtech.com.jgiven_android.example.R;


@RunWith(AndroidJUnit4.class)
Expand Down
3 changes: 1 addition & 2 deletions example-projects/android/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tngtech.jgiven.android.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Expand Down
3 changes: 1 addition & 2 deletions example-projects/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tngtech.jgiven.android.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:allowBackup="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import android.widget.Button;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import jgiven.tngtech.com.jgiven_android.example.R;

public class MainActivity extends AppCompatActivity {

Expand Down
4 changes: 0 additions & 4 deletions example-projects/java11/src/main/java/module-info.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>11</source>
<target>11</target>
<source>17</source>
<target>17</target>
<debug>true</debug>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.tngtech.jgiven.exampleprojects.java11;
package com.tngtech.jgiven.exampleprojects.java17;

import java.util.function.*;

public class Java11 {
public class Java17 {

public static boolean test(String y) {
Predicate<String> p = ( var x ) -> x == x;
Expand Down
4 changes: 4 additions & 0 deletions example-projects/java17/src/main/java/module-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module jgiven.exampleprojects.java17 {
exports com.tngtech.jgiven.exampleprojects.java17;
requires java.base;
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.tngtech.jgiven.exampleprojects.java11;
package com.tngtech.jgiven.exampleprojects.java17;

import com.tngtech.jgiven.junit.SimpleScenarioTest;
import org.junit.Test;
import com.tngtech.jgiven.exampleprojects.java11.Java11;
import com.tngtech.jgiven.exampleprojects.java17.Java17;

public class Java11Test extends SimpleScenarioTest<Java11Test.Steps> {
public class Java17Test extends SimpleScenarioTest<Java17Test.Steps> {

@Test
public void example_scenario() {
Expand All @@ -20,7 +20,7 @@ public void some_context() {
}

public void some_action() {
Java11.test("f");
Java17.test("f");
}

public void some_outcome() {
Expand Down
4 changes: 2 additions & 2 deletions example-projects/junit5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ plugins {
apply plugin: 'com.tngtech.jgiven.gradle-plugin'

compileJava {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
options.compilerArgs += '-parameters'
options.encoding = 'UTF-8'
}
Expand Down
6 changes: 3 additions & 3 deletions example-projects/kotlin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}

plugins {
id "org.jetbrains.kotlin.jvm" version "2.0.21"
id "org.jetbrains.kotlin.jvm" version "2.1.0"
}

apply plugin: 'java'
Expand All @@ -18,8 +18,8 @@ apply plugin: 'eclipse'
apply plugin: 'com.tngtech.jgiven.gradle-plugin'

compileJava {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
options.compilerArgs += '-parameters'
options.encoding = 'UTF-8'
}
Expand Down
2 changes: 1 addition & 1 deletion example-projects/maven/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<release>11</release>
<release>17</release>
<debug>true</debug>
</configuration>
</plugin>
Expand Down
6 changes: 3 additions & 3 deletions example-projects/selenium/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ repositories {
}

compileJava {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
options.compilerArgs += '-parameters'
options.encoding = 'UTF-8'
}

dependencies {
testImplementation "com.tngtech.jgiven:jgiven-junit:${version}"
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.seleniumhq.selenium:selenium-java:4.26.0'
testImplementation 'org.seleniumhq.selenium:selenium-java:4.27.0'
testImplementation 'io.github.bonigarcia:webdrivermanager:5.9.2'
testImplementation 'org.assertj:assertj-core:3.26.3'

Expand Down
4 changes: 2 additions & 2 deletions example-projects/testng/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ plugins {
apply plugin: 'com.tngtech.jgiven.gradle-plugin'

compileJava {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
options.compilerArgs += '-parameters'
options.encoding = 'UTF-8'
}
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
aspectj-version = "1.9.22.1"
byteBuddy-version = "1.15.10"
junit4-version = "4.13.2"
slf4j-version = "2.0.9"
slf4j-version = "2.0.16"
spring-version = "5.3.39"
androidx-test-version = "1.6.1"

[libraries]
androidGradlePlugin = { module = "com.android.tools.build:gradle", version = "7.4.2"}
androidx-appcompat = {module = "androidx.appcompat:appcompat", version = "1.6.1"}
androidGradlePlugin = { module = "com.android.tools.build:gradle", version = "8.5.2"}
androidx-appcompat = {module = "androidx.appcompat:appcompat", version = "1.7.0"}
androidx-test-core = {module = "androidx.test:core", version.ref = "androidx-test-version"}
androidx-test-rules = {module = "androidx.test:rules", version.ref = "androidx-test-version"}
androidx-test-junit = {module = "androidx.test.ext:junit", version = "1.2.1"}
Expand Down
11 changes: 6 additions & 5 deletions jgiven-android-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ repositories {
apply plugin: 'com.android.application'

android {
compileSdkVersion androidCompileSdkVersion
compileSdk androidCompileSdkVersion
namespace 'jgiven.tngtech.com.jgiven_android.example'
defaultConfig {
applicationId "com.tngtech.jgiven.android.example"
minSdkVersion androidMinSdkVersion
Expand All @@ -28,8 +29,8 @@ android {
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

buildTypes {
Expand All @@ -47,8 +48,8 @@ configurations {
dependencies {
implementation(libs.androidx.appcompat) {
exclude group: 'com.google.guava', module: 'listenablefuture'
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-jdk8'
}

androidTestImplementation('androidx.test.espresso:espresso-core:3.6.1', {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.google.guava', module: 'listenablefuture'
Expand All @@ -65,7 +66,7 @@ dependencies {
}

def targetDir = 'build/reports/jgiven/json'
def adb = android.getAdbExe().toString()
def adb = android.adbExecutable.toString()
def reportsDir = '/storage/emulated/0/Download/jgiven-reports'

task cleanJGivenReports(type: Delete) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import com.tngtech.jgiven.integration.android.AndroidJGivenTestRule;
import com.tngtech.jgiven.junit.SimpleScenarioTest;
import java.util.List;

import jgiven.tngtech.com.jgiven_android.example.R;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down
3 changes: 1 addition & 2 deletions jgiven-android-test/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tngtech.jgiven.android.example">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

Expand Down
Loading

0 comments on commit 37787bd

Please sign in to comment.