Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
radarsh committed Oct 10, 2019
2 parents 8b7e6b6 + 276ed62 commit 269d5dd
Show file tree
Hide file tree
Showing 29 changed files with 208 additions and 79 deletions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: radarsh

---

**Description**

A clear and concise description of what problem you are facing.

**Versions**

- Test logger version:
- Gradle version:
- Java version:

**Type of test being run**

Whether it is JUnit, Spock, TestNg, or anything else. Also, try to include a sample test here.

**Test logger configuration**

Paste your test logger configuration here.

**Screenshots**

If possible, add screenshots to help explain your problem.

**Additional information**

Add any other information about the problem here.
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Documentation issue
about: Clarify something about the documentation
title: ''
labels: documentation
assignees: radarsh

---

**Description**

Explain what needs clarifying and where.
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature
assignees: radarsh

---

**Description**

A clear and concise description of what the feature should do.

**Additional information**

Supplement with examples, samples from other projects, etc here.
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Question
about: Ask a question
title: ''
labels: question
assignees: radarsh

---

**Description**

Ask your question here.
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE/technical-debt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: Technical debt
about: Create a technical debt issue
title: ''
labels: technical debt
assignees: radarsh

---

**Description**

Describe the technical debt here.
21 changes: 19 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
# Change Log

## [v1.7.1](https://github.com/radarsh/gradle-test-logger-plugin/tree/v1.7.1) (2019-10-07)
## [2.0.0](https://github.com/radarsh/gradle-test-logger-plugin/tree/v2.0.0) (2019-10-10)
[Full Changelog](https://github.com/radarsh/gradle-test-logger-plugin/compare/v1.7.1...v2.0.0)

**Closed issues:**

- Upgrade versions of everything [\#132](https://github.com/radarsh/gradle-test-logger-plugin/issues/132)
- Upgrade to Gradle 5.6.2 [\#129](https://github.com/radarsh/gradle-test-logger-plugin/issues/129)
- Upgrade to Gradle 5.2 [\#102](https://github.com/radarsh/gradle-test-logger-plugin/issues/102)

[Full Changelog](https://github.com/radarsh/gradle-test-logger-plugin/compare/v1.7.0...v.1.7.1)
**Merged pull requests:**

- Update issue templates [\#135](https://github.com/radarsh/gradle-test-logger-plugin/pull/135) ([radarsh](https://github.com/radarsh))
- Switch to modern Gradle dependency configurations [\#134](https://github.com/radarsh/gradle-test-logger-plugin/pull/134) ([radarsh](https://github.com/radarsh))
- Upgrade all dependency versions [\#133](https://github.com/radarsh/gradle-test-logger-plugin/pull/133) ([radarsh](https://github.com/radarsh))
- Remove references to Gradle 2.1 [\#131](https://github.com/radarsh/gradle-test-logger-plugin/pull/131) ([radarsh](https://github.com/radarsh))
- Upgrade to Gradle 5.6.2 [\#130](https://github.com/radarsh/gradle-test-logger-plugin/pull/130) ([radarsh](https://github.com/radarsh))
- Upgrade to Gradle 5.2 [\#107](https://github.com/radarsh/gradle-test-logger-plugin/pull/107) ([radarsh](https://github.com/radarsh))

## [v1.7.1](https://github.com/radarsh/gradle-test-logger-plugin/tree/v1.7.1) (2019-10-07)
[Full Changelog](https://github.com/radarsh/gradle-test-logger-plugin/compare/v1.7.0...v1.7.1)

**Closed issues:**

Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ Scroll down for more themes and customisation options or visit the [screenshots

## Usage

### Modern Gradle
### Using the plugins DSL

```groovy
plugins {
id 'com.adarshr.test-logger' version '1.7.1'
id 'com.adarshr.test-logger' version '2.0.0'
}
```

### Gradle < 2.1
### Using legacy plugin application

```groovy
buildscript {
Expand All @@ -39,13 +39,15 @@ buildscript {
}
}
dependencies {
classpath 'com.adarshr:gradle-test-logger-plugin:1.7.1'
classpath 'com.adarshr:gradle-test-logger-plugin:2.0.0'
}
}
apply plugin: 'com.adarshr.test-logger'
```

Note: Test logger 2.x is incompatible with Gradle 4.x; please use test logger 1.7.1.

## Configuration

The plugin registers an extension called `testlogger` (all lowercase and one word) at project level
Expand Down
37 changes: 16 additions & 21 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
buildscript {
dependencies {
classpath 'org.fusesource.jansi:jansi:1.16'
classpath 'org.fusesource.jansi:jansi:1.18'
}
}

plugins {
id 'com.gradle.build-scan' version '1.16'
id 'com.gradle.build-scan' version '2.4.2'
id 'groovy'
id 'java-gradle-plugin'
id 'maven-publish'
id 'idea'
id 'jacoco'
id 'com.gradle.plugin-publish' version '0.10.0'
id 'com.github.kt3k.coveralls' version '2.8.2'
id 'com.gradle.plugin-publish' version '0.10.1'
id 'com.github.kt3k.coveralls' version '2.8.4'
}

buildScan {
Expand Down Expand Up @@ -43,24 +43,24 @@ sourceSets {
}

dependencies {
compile gradleApi()
compile localGroovy()
compile 'org.fusesource.jansi:jansi:1.16'
implementation gradleApi()
implementation localGroovy()
implementation 'org.fusesource.jansi:jansi:1.18'

testCompile gradleTestKit()
testCompile('org.spockframework:spock-core:1.1-groovy-2.4') {
testImplementation gradleTestKit()
testImplementation('org.spockframework:spock-core:1.3-groovy-2.5') {
exclude module: 'groovy-all'
}
testCompile 'net.bytebuddy:byte-buddy:1.7.5'
testCompile 'org.objenesis:objenesis:2.6'
testCompile 'commons-io:commons-io:2.5'
testImplementation 'net.bytebuddy:byte-buddy:1.10.1'
testImplementation 'org.objenesis:objenesis:3.1'
testImplementation 'commons-io:commons-io:2.6'

functionalTestCompile localGroovy()
functionalTestCompile gradleTestKit()
functionalTestCompile('org.spockframework:spock-core:1.1-groovy-2.4') {
functionalTestImplementation localGroovy()
functionalTestImplementation gradleTestKit()
functionalTestImplementation('org.spockframework:spock-core:1.3-groovy-2.5') {
exclude module: 'groovy-all'
}
functionalTestCompile 'commons-io:commons-io:2.5'
functionalTestImplementation 'commons-io:commons-io:2.6'
}

gradlePlugin {
Expand Down Expand Up @@ -98,11 +98,6 @@ task functionalTest(type: Test) {
minHeapSize '128m'
maxHeapSize '512m'

jacoco {
append = true
destinationFile = file("${buildDir}/jacoco/test.exec")
}

testlogger {
theme 'mocha-parallel'
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=1.7.1
version=2.0.0
group=com.adarshr
org.gradle.daemon=true
org.gradle.caching=false
Expand Down
2 changes: 2 additions & 0 deletions gradle/coverage.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ jacoco {
}

jacocoTestReport {
executionData "${project.buildDir}/jacoco/test.exec", "${project.buildDir}/jacoco/functionalTest.exec"

reports {
xml.enabled = true
html.enabled = true
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
22 changes: 19 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed 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
#
# https://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.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down Expand Up @@ -109,8 +125,8 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
Expand Down
18 changes: 17 additions & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
Expand All @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
Expand Down
2 changes: 0 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
rootProject.name = 'gradle-test-logger-plugin'

enableFeaturePreview('STABLE_PUBLISHING')
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ import org.gradle.api.tasks.testing.Test
@CompileStatic
class TestLoggerPlugin implements Plugin<Project> {

private static final String EXTENSION_NAME = 'testlogger'

@Override
void apply(Project project) {
createExtensions(project)

project.afterEvaluate {
project.tasks.withType(Test).each { test ->
project.tasks.withType(Test).configureEach { test ->
def testLoggerExtension = buildTestLoggerExtension(test)

test.testLogging.lifecycle.events = []
Expand All @@ -28,20 +30,15 @@ class TestLoggerPlugin implements Plugin<Project> {
}

private static void createExtensions(Project project) {
project.extensions.create('testlogger', TestLoggerExtension, project)
project.tasks.withType(Test).each { task ->
task.extensions.create('testlogger', TestLoggerExtension, project)
}
project.tasks.whenTaskAdded { task ->
if (task instanceof Test) {
task.extensions.create('testlogger', TestLoggerExtension, project)
}
project.extensions.create(EXTENSION_NAME, TestLoggerExtension, project)
project.tasks.withType(Test).configureEach { task ->
task.extensions.create(EXTENSION_NAME, TestLoggerExtension, project)
}
}

private static TestLoggerExtension buildTestLoggerExtension(Test test) {
def testExtension = test.extensions.findByName('testlogger') as TestLoggerExtension
def projectExtension = test.project.extensions.findByName('testlogger') as TestLoggerExtension
def testExtension = test.extensions.findByName(EXTENSION_NAME) as TestLoggerExtension
def projectExtension = test.project.extensions.findByName(EXTENSION_NAME) as TestLoggerExtension

testExtension
.undecorate()
Expand All @@ -52,9 +49,9 @@ class TestLoggerPlugin implements Plugin<Project> {

private static Map<String, String> getOverrides() {
(System.properties as Map<String, String>).findAll { key, value ->
key.startsWith 'testlogger.'
key.startsWith "${EXTENSION_NAME}."
}.collectEntries { key, value ->
[(key.replace('testlogger.', '')): value]
[(key.replace("${EXTENSION_NAME}.", '')): value]
} as Map<String, String>
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ abstract class AbstractFunctionalSpec extends Specification {

private static final String TEST_ROOT = 'src/test-functional/resources'

private static final String GRADLE_VERSION = '4.10'
private static final String GRADLE_VERSION = '5.6.2'

@Rule
TemporaryFolder temporaryFolder
Expand Down
Loading

0 comments on commit 269d5dd

Please sign in to comment.