-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update .editorconfig to format *.gradle.kts files; reformat build.gra…
…dle.kts
- Loading branch information
1 parent
666fecc
commit 10242e9
Showing
3 changed files
with
95 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
plugins { | ||
id("java-library") | ||
id("maven-publish") | ||
id("signing") | ||
id("java-library") | ||
id("maven-publish") | ||
id("signing") | ||
} | ||
|
||
fun isSnapshotRelease(versionString: String): Boolean { | ||
return versionString.endsWith("SNAPSHOT") | ||
return versionString.endsWith("SNAPSHOT") | ||
} | ||
|
||
val githubProjectName = "jqwik-team" | ||
|
@@ -25,119 +25,119 @@ version = jqwikMockitoVersion | |
description = "Jqwik Mockito support module" | ||
|
||
repositories { | ||
mavenCentral() | ||
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots") | ||
mavenCentral() | ||
maven(url = "https://s01.oss.sonatype.org/content/repositories/snapshots") | ||
} | ||
|
||
tasks.jar { | ||
archiveBaseName.set(artifactId) | ||
archiveVersion.set(jqwikMockitoVersion) | ||
manifest { | ||
attributes("Automatic-Module-Name" to "net.jqwik.mockito") | ||
} | ||
archiveBaseName.set(artifactId) | ||
archiveVersion.set(jqwikMockitoVersion) | ||
manifest { | ||
attributes("Automatic-Module-Name" to "net.jqwik.mockito") | ||
} | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(8) | ||
} | ||
withJavadocJar() | ||
withSourcesJar() | ||
toolchain { | ||
languageVersion = JavaLanguageVersion.of(8) | ||
} | ||
} | ||
|
||
tasks.compileTestJava { | ||
options.compilerArgs.add("-parameters") | ||
options.encoding = "UTF-8" | ||
options.compilerArgs.add("-parameters") | ||
options.encoding = "UTF-8" | ||
} | ||
|
||
tasks.test { | ||
useJUnitPlatform { | ||
includeEngines("jqwik") | ||
} | ||
useJUnitPlatform { | ||
includeEngines("jqwik") | ||
} | ||
} | ||
|
||
dependencies { | ||
api("org.opentest4j:opentest4j:${opentest4jVersion}") | ||
api("net.jqwik:jqwik:${jqwikVersion}") | ||
compileOnly("org.mockito:mockito-core:${mockitoVersion}") | ||
compileOnly("org.mockito:mockito-junit-jupiter:${mockitoVersion}") | ||
api("org.opentest4j:opentest4j:${opentest4jVersion}") | ||
api("net.jqwik:jqwik:${jqwikVersion}") | ||
compileOnly("org.mockito:mockito-core:${mockitoVersion}") | ||
compileOnly("org.mockito:mockito-junit-jupiter:${mockitoVersion}") | ||
|
||
testCompileOnly("org.projectlombok:lombok:${lombokVersion}") | ||
testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") | ||
testCompileOnly("org.projectlombok:lombok:${lombokVersion}") | ||
testAnnotationProcessor("org.projectlombok:lombok:${lombokVersion}") | ||
|
||
testImplementation("org.junit.jupiter:junit-jupiter:${junitJupiterVersion}") | ||
testImplementation("org.assertj:assertj-core:${assertJVersion}") | ||
testImplementation("org.mockito:mockito-junit-jupiter:${mockitoVersion}") | ||
testImplementation("org.junit.jupiter:junit-jupiter:${junitJupiterVersion}") | ||
testImplementation("org.assertj:assertj-core:${assertJVersion}") | ||
testImplementation("org.mockito:mockito-junit-jupiter:${mockitoVersion}") | ||
} | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
// hint: credentials are in ~/.gradle/gradle.properties | ||
// Since June 2024 Sonatype seems to require a token for publishing | ||
val repoUsername: String = project.findProperty("tokenUsername") as? String ?: "" | ||
val repoPassword: String = project.findProperty("tokenPassword") as? String ?: "" | ||
|
||
credentials { | ||
username = repoUsername | ||
password = repoPassword | ||
} | ||
|
||
val releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" | ||
url = uri( | ||
if (isSnapshotRelease) { | ||
snapshotsRepoUrl | ||
} else { | ||
releasesRepoUrl | ||
} | ||
) | ||
} | ||
} | ||
publications { | ||
create<MavenPublication>("jqwikMockito") { | ||
groupId = moduleGroupId | ||
artifactId = artifactId | ||
from(components["java"]) | ||
pom { | ||
groupId = moduleGroupId | ||
name = artifactId | ||
description = "Jqwik Mockito support module" | ||
url = "https://github.org/$githubProjectName/$artifactId" | ||
licenses { | ||
license { | ||
name = "Eclipse Public License - v 2.0" | ||
url = "http://www.eclipse.org/legal/epl-v20.html" | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = "agustafson-atl" | ||
name = "Andrew Gustafson" | ||
email = "[email protected]" | ||
} | ||
developer { | ||
id = githubProjectName | ||
name = "Johannes Link" | ||
email = "[email protected]" | ||
} | ||
} | ||
scm { | ||
connection = "scm:git:git://github.com/$githubProjectName/$artifactId.git" | ||
developerConnection = "scm:git:git://github.com/$githubProjectName/$artifactId.git" | ||
url = "https://github.com/$githubProjectName/$artifactId" | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
// hint: credentials are in ~/.gradle/gradle.properties | ||
// Since June 2024 Sonatype seems to require a token for publishing | ||
val repoUsername: String = project.findProperty("tokenUsername") as? String ?: "" | ||
val repoPassword: String = project.findProperty("tokenPassword") as? String ?: "" | ||
|
||
credentials { | ||
username = repoUsername | ||
password = repoPassword | ||
} | ||
|
||
val releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
val snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" | ||
url = uri( | ||
if (isSnapshotRelease) { | ||
snapshotsRepoUrl | ||
} else { | ||
releasesRepoUrl | ||
} | ||
) | ||
} | ||
} | ||
publications { | ||
create<MavenPublication>("jqwikMockito") { | ||
groupId = moduleGroupId | ||
artifactId = artifactId | ||
from(components["java"]) | ||
pom { | ||
groupId = moduleGroupId | ||
name = artifactId | ||
description = "Jqwik Mockito support module" | ||
url = "https://github.org/$githubProjectName/$artifactId" | ||
licenses { | ||
license { | ||
name = "Eclipse Public License - v 2.0" | ||
url = "http://www.eclipse.org/legal/epl-v20.html" | ||
} | ||
} | ||
developers { | ||
developer { | ||
id = "agustafson-atl" | ||
name = "Andrew Gustafson" | ||
email = "[email protected]" | ||
} | ||
developer { | ||
id = githubProjectName | ||
name = "Johannes Link" | ||
email = "[email protected]" | ||
} | ||
} | ||
scm { | ||
connection = "scm:git:git://github.com/$githubProjectName/$artifactId.git" | ||
developerConnection = "scm:git:git://github.com/$githubProjectName/$artifactId.git" | ||
url = "https://github.com/$githubProjectName/$artifactId" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
if (!isSnapshotRelease) { | ||
sign(publishing.publications["jqwikMockito"]) | ||
} | ||
if (!isSnapshotRelease) { | ||
sign(publishing.publications["jqwikMockito"]) | ||
} | ||
} | ||
|
||
tasks.wrapper { | ||
gradleVersion = "8.11.1" // upgrade with: ./gradlew wrapper | ||
gradleVersion = "8.11.1" // upgrade with: ./gradlew wrapper | ||
} |