Skip to content

Commit

Permalink
Bumped Gradle 8.1.1 and fixed CC issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gmazzo committed Apr 25, 2023
1 parent 9f1d413 commit 96cbada
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 16 deletions.
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
org.gradle.jvmargs=-Xmx1g
org.gradle.caching=true
#org.gradle.configuration-cache=true FIXME `git-versioning` and `kotlin-multiplatform` are not compatible
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 4 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
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 @@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi


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

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
Expand Down
7 changes: 0 additions & 7 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,6 @@ tasks.withType<Test> {
useJUnitPlatform()
}

tasks.jacocoTestReport {
doFirst {
// sometimes fails with "Unable to read execution data file build/jacoco/test.exec"
Thread.sleep(1000)
}
}

tasks.check {
dependsOn("jacocoTestReport")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import org.gradle.api.NamedDomainObjectProvider
import org.gradle.api.provider.Property
import org.gradle.api.provider.Provider
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.Nested
import org.gradle.api.tasks.Optional

interface BuildConfigClassSpec : Named {
Expand All @@ -20,7 +21,7 @@ interface BuildConfigClassSpec : Named {
@get:Optional
val packageName: Property<String>

@get:Input
@get:Nested
val buildConfigFields: NamedDomainObjectContainer<BuildConfigField>

fun className(className: String) = apply {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import org.gradle.api.tasks.Input

interface BuildConfigField : Named {

@Input
override fun getName(): String

@get:Input
val type: Property<String>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package com.github.gmazzo.gradle.plugins

import org.gradle.testkit.runner.GradleRunner
import org.gradle.testkit.runner.TaskOutcome
import org.gradle.tooling.internal.consumer.DefaultGradleConnector
import org.junit.jupiter.api.AfterAll
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.TestInstance
import org.junit.jupiter.api.parallel.Execution
Expand Down Expand Up @@ -165,6 +167,16 @@ class BuildConfigPluginTest {
javaClass.classLoader.getResourceAsStream("testkit-gradle.properties")!!.use {
file.outputStream().use(it::copyTo)
}

file.appendText("org.gradle.caching=true")
if (configurationCache) {
file.appendText("org.gradle.configuration-cache=true")
}
}

@AfterAll
fun tearDownGradleDaemon() {
DefaultGradleConnector.close()
}

data class Args(
Expand All @@ -175,11 +187,12 @@ class BuildConfigPluginTest {
) {

val projectDir =
File("test-project/" +
"gradle-$gradleVersion/" +
"kotlin-${kotlinVersion ?: "none"}/" +
(if (withPackage) "withPackage/" else "withoutPackage/")+
(if (configurationCache) "withCC" else "withoutCC")
File(
"test-project/" +
"gradle-$gradleVersion/" +
"kotlin-${kotlinVersion ?: "none"}/" +
(if (withPackage) "withPackage/" else "withoutPackage/") +
(if (configurationCache) "withCC" else "withoutCC")
)

}
Expand Down

0 comments on commit 96cbada

Please sign in to comment.