From 8f7f9f60182c60c963510f457259af9434e18674 Mon Sep 17 00:00:00 2001 From: John Ferguson Smart Date: Thu, 18 Apr 2024 10:39:19 +0100 Subject: [PATCH] Removed old build.gradle file --- build.gradle | 502 --------------------------------------------------- 1 file changed, 502 deletions(-) delete mode 100644 build.gradle diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 2b96b74fe..000000000 --- a/build.gradle +++ /dev/null @@ -1,502 +0,0 @@ -//import org.ajoberstar.gradle.git.release.opinion.Strategies -//import org.ajoberstar.grgit.Grgit - -buildscript { - repositories { - jcenter() - maven { url "https://plugins.gradle.org/m2/" } - } - dependencies { - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' - classpath 'org.ajoberstar:gradle-git:1.6.0' - classpath 'org.pegdown:pegdown:1.4.1' - classpath "gradle.plugin.se.bjurr.gitchangelog:git-changelog-gradle-plugin:1.51" - classpath 'com.github.ben-manes:gradle-versions-plugin:0.15.0' - classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.2' - classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.17" - } -} - -plugins { -// id 'org.ajoberstar.release-opinion' version '1.7.2' - id 'project-report' - id "org.sonarqube" version "2.6" - id 'org.jetbrains.dokka' version '0.9.17' - id 'java-library' -} - -apply plugin: "se.bjurr.gitchangelog.git-changelog-gradle-plugin" -apply plugin: 'project-report' - -group = 'net.serenity-bdd' - -subprojects { - task allDeps(type: DependencyReportTask) {} -} - -ext { - // Bintray configuration - - if (!project.hasProperty("bintrayUsername")) { - bintrayUsername = 'wakaleo' - } - if (!project.hasProperty("bintrayApiKey")) { - bintrayApiKey = '' - } - -} - -allprojects { - apply plugin: 'project-report' - apply plugin: 'java-library' - apply plugin: 'com.github.ben-manes.versions' - -// dependencyUpdates.resolutionStrategy = { -// componentSelection { rules -> -// rules.all { ComponentSelection selection -> -// boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm', 'atlassian'].any { qualifier -> -// selection.candidate.version.toLowerCase() ==~ /(?i).*[.-]${qualifier}[.\d-]*/ -// } -// if (rejected) { -// selection.reject('Release candidate') -// } -// } -// } -// } - - configurations.all { - resolutionStrategy { - // fail fast on dependency convergence problems - - // failOnVersionConflict() - - // force versions to fix dependency convergence problems - // whe//n updating this list, update Serenity's declared deps if exists - // TODO make work for generated Maven POM... - // it's working for gradle build, but also had to exclude old transitives for generated POM - force "org.apache.commons:commons-collections4:${commonsCollectionsVersion}", - "com.thoughtworks.xstream:xstream:${xstreamVersion}", - "xml-apis:xml-apis:${xmlApisVersion}", - "org.apache.httpcomponents:httpmime:${httpclientVersion}", - "org.eclipse.jetty:jetty-http:${jettyVersion}", - "org.eclipse.jetty:jetty-util:${jettyVersion}", - "org.eclipse.jetty:jetty-io:${jettyVersion}", - "junit:junit:${junitVersion}" - } - } -} - -//release { -// grgit = Grgit.open(file('.')) -// defaultVersionStrategy Strategies.SNAPSHOT -// versionStrategy Strategies.SNAPSHOT -//} - -subprojects { - apply plugin: 'java' - apply plugin: 'groovy' - apply plugin: 'eclipse' - apply plugin: 'idea' - apply plugin: 'maven' - apply plugin: 'maven-publish' - apply plugin: 'com.jfrog.bintray' - apply plugin: 'com.github.johnrengelman.shadow' - apply plugin: 'org.jetbrains.dokka' - - sourceCompatibility = 1.8 - targetCompatibility = 1.8 - - repositories { - mavenLocal() - jcenter() - } - - ext { - bintrayBaseUrl = 'https://api.bintray.com/maven' - bintrayRepository = 'maven' - bintrayPackage = 'serenity-core' - projectDescription = 'Serenity core libraries' - os = "windows" - if (org.gradle.internal.os.OperatingSystem.current().isMacOsX()) { - os = "macos" - } - if (org.gradle.internal.os.OperatingSystem.current().isLinux()) { - os = "linux" - } - if (!project.hasProperty("bintrayUsername")) { - bintrayUsername = 'wakaleo' - } - if (!project.hasProperty("bintrayApiKey")) { - bintrayApiKey = '' - } - - chromeDriverBinary = project.file("../src/test/resources/drivers/${os}/chromedriver").absolutePath - geckoDriverBinary = project.file("../src/test/resources/drivers/${os}/geckodriver").absolutePath - } - group = 'net.serenity-bdd' - version = rootProject.version - - test { - exclude '**/*$*' - exclude '**/integration/**' - exclude '**/samples/**' - exclude '**/*Sample*' -// minHeapSize = "128m" -// maxHeapSize = "1536m" - if (!JavaVersion.current().isJava8Compatible()) { - jvmArgs += ["-XX:MaxPermSize=256m"] - } -// testLogging { -// events "passed", "skipped", "failed", "standardOut", "standardError" -// } - - maxHeapSize '512m' - forkEvery 100 - jvmArgs '-Xmx512m', '-Xms512m' - } - - task integrationTests(type: Test) { - systemProperty "webdriver.chrome.driver", chromeDriverBinary - systemProperty "webdriver.gecko.driver", geckoDriverBinary - exclude '**/*$*' - exclude '**/samples/**' - exclude '**/*Sample*' - exclude '**/integration/browsers/**' - exclude '**/integration/appium/**' - include '**/integration/**' - reports.junitXml.destination = file("${buildDir}/reports/integration-tests") - reports.html.destination = file("${buildDir}/reports/integration-tests") - minHeapSize = "128m" - maxHeapSize = "1536m" - if (!JavaVersion.current().isJava8Compatible()) { - jvmArgs '-XX:MaxPermSize=256m' - } - } - - test { - useJUnitPlatform() - testLogging { - events "failed"//, "passed", "skipped" - exceptionFormat = 'full' - } - } - - integrationTests { - useJUnitPlatform() - testLogging { - events "failed"//, "passed", "skipped" - exceptionFormat = 'full' - } - } - - task browserTests(type: Test) { - exclude '**/*$*' - exclude '**/samples/**' - exclude '**/*Sample*' - exclude '**/*Base' - exclude '**/integration/appium/**' - include '**/integration/browsers/**' - } - - - task appiumTests(type: Test) { - exclude '**/*$*' - exclude '**/samples/**' - exclude '**/*Sample*' - exclude '**/*Base' - exclude '**/integration/browsers/**' - include '**/integration/appium/**' - } - - task javadoc(type: Javadoc, overwrite: true) { - source = sourceSets.main.allJava - options.memberLevel = JavadocMemberLevel.PUBLIC - options.addStringOption('views') - options.addStringOption('all') - options.addStringOption('quiet') - options.addStringOption('qualify') - options.addStringOption('debug') - options.addStringOption('Xdoclint:none') - options.encoding = 'UTF-8' - classpath = configurations.compileClasspath - } - - dokka { - outputFormat = 'html' - outputDirectory = "$buildDir/javadoc" - } - -// integrationTests.dependsOn test - check.dependsOn -= integrationTests - - -// dependencies { -// compile "net.bytebuddy:byte-buddy:${byteBuddyVersion}" -// compile "net.bytebuddy:byte-buddy-agent:${byteBuddyVersion}" -// compile "com.google.guava:guava:${guavaVersion}" -// -// compile("com.google.inject:guice:${guiceVersion}") { -// exclude group: "org.ow2.asm", module: "asm" -// exclude group: "asm", module: "asm" -// exclude group: "com.google.guava", module: "guava" -// exclude group: "org.sonatype.sisu.inject", module: "cglib" -// } -// -// compile("org.ow2.asm:asm:${asmVersion}") -// -// compile "commons-codec:commons-codec:${commonsCodecVersion}" -// compile "org.objenesis:objenesis:${objenesisVersion}" -// compile "org.slf4j:slf4j-api:${slf4jVersion}" -// compile "xml-apis:xml-apis:${xmlApisVersion}" -// compile("io.cucumber:cucumber-core:${cucumberVersion}") { -// exclude group: "org.apiguardian", module: 'apiguardian-api' -// } -// compile("io.cucumber:cucumber-java:${cucumberVersion}") { -// exclude group: "org.apiguardian", module: 'apiguardian-api' -// } -// -// -// compile("commons-logging:commons-logging:${commonsLoggingVersion}") -// testCompile "junit:junit:${junitVersion}" -// -// compile "io.vavr:vavr:${vavrVersion}" -// -// /* Required for Java 9 and higher */ -// compile "javax.xml.bind:jaxb-api:${jaxbApiVersion}" -// compile "com.sun.xml.bind:jaxb-core:${jaxbCoreVersion}" -// compile "com.sun.xml.bind:jaxb-impl:${jaxbImplVersion}" -// compile "javax.activation:activation:${activationVersion}" -// -// testCompile("ch.qos.logback:logback-classic:${logbackVersion}") { -// exclude group: "org.slf4j", module: 'slf4j-api' -// } -// compile("org.mockito:mockito-core:${mockitoCoreVersion}") { -// exclude group: "org.hamcrest", module: "hamcrest-core" -// exclude group: "org.objenesis", module: "objenesis" -// exclude group: "net.bytebuddy", module: "byte-buddy" -// exclude group: "net.bytebuddy", module: "byte-buddy-agent" -// } -// testCompile "org.hamcrest:hamcrest-integration:${hamcrestVersion}" -// testCompile "org.hamcrest:hamcrest-library:${hamcrestVersion}" -// testCompile "org.hamcrest:hamcrest-core:${hamcrestVersion}" -// -// testCompile("org.codehaus.groovy:groovy-all:${groovyVersion}") { -// exclude group: "org.junit" -// exclude group: "org.junit.jupiter" -// exclude group: "com.google.inject" -// exclude group: "org.junit.platform" -// } -// testCompile("org.spockframework:spock-core:${spockVersion}") { -// exclude group: "org.codehaus.groovy" -// exclude group: "org.junit.platform" -// -// } -// testCompile "org.jetbrains:annotations:19.0.0" -// testCompile "org.assertj:assertj-core:${assertjVersion}" -// } - -// configurations.all { -// resolutionStrategy.eachDependency { DependencyResolveDetails details -> -// if (details.requested.name == 'mockito-all') { -// details.useTarget group: 'org.mockito', name: 'mockito-core', version: "${mockitoVersion}" -// } -// if (details.requested.name == 'hamcrest-core') { -// details.useTarget group: 'org.hamcrest', name: 'hamcrest-core', version: "${hamcrestVersion}" -// } -// if (details.requested.name == 'hamcrest-all') { -// details.useTarget group: 'org.hamcrest', name: 'hamcrest-all', version: "${hamcrestVersion}" -// } -// if (details.requested.name == 'hamcrest-library') { -// details.useTarget group: 'org.hamcrest', name: 'hamcrest-library', version: "${hamcrestVersion}" -// } -// } -// } - - jar { - inputs.property("moduleName", project.name) - - manifest.attributes["Created-By"] = - "${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})" - manifest.attributes["Implementation-Title"] = project.name - manifest.attributes["Implementation-Version"] = project.version - manifest.attributes["Automatic-Module-Name"] = project.name - - from("${rootProject.projectDir}/src/dist") { - include "license.txt" - include "notice.txt" - into "META-INF" - expand(copyright: new Date().format("yyyy"), version: project.version) - } - } - - bintray { - user = bintrayUsername //this usually comes form gradle.properties file in ~/.gradle - key = bintrayApiKey //this usually comes form gradle.properties file in ~/.gradle -// publications = ['mavenJava','shadow'] // see publications closure - publications = ['mavenJava'] // see publications closure - publish = true - pkg { - repo = 'maven' - userOrg = 'serenity' - name = 'serenity-core' - desc = 'Serenity core libraries' - licenses = ['Apache-2.0'] - labels = ['serenity', 'bdd'] - } - } - - task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' - from sourceSets.main.allSource - } - - task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir - } - - artifacts { - archives sourcesJar, javadocJar - } - - publishing { - publications { - mavenJava(MavenPublication) { - - println "Publishing $project.name:$project.group:$project.version" - - from components.java - - artifact sourcesJar { - classifier "sources" - } - - artifact javadocJar { - classifier "javadoc" - } - - pom.withXml { - asNode().children().last() + { - resolveStrategy = Closure.DELEGATE_FIRST - name "$project.name" - description "$projectDescription" - - url 'https://github.com/serenity-bdd/serenity-core' - scm { - url 'scm:git:git@github.com:serenity-bdd/serenity-core.git' - connection 'scm:git:git@github.com:serenity-bdd/serenity-core.git' - developerConnection 'scm:git:git@github.com:serenity-bdd/serenity-core.git' - } - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/license/LICENSE-2.0.txt' - distribution 'repo' - } - } - developers { - developer { - id 'johnsmart' - name 'John Ferguson Smart' - email 'john.smart@wakaleo.com' - } - } - } - // Preserve compile-scope dependencies - asNode().dependencies.'*'.findAll() { - it.scope.text() == 'runtime' && project.configurations.implementation.allDependencies.find { dep -> - dep.name == it.artifactId.text() - } - }.each() { - it.scope*.value = 'implementation' - } - } - } - } - } - - tasks.withType(GroovyCompile) { - options.encoding = "UTF-8" // for Java compilation - groovyOptions.encoding = "UTF-8" // for Groovy compilation - } - - tasks.withType(JavaCompile) { - options.compilerArgs << "-Xlint:-options" - options.encoding = 'UTF-8' - } - if (JavaVersion.current().isJava8Compatible()) { - allprojects { - tasks.withType(Javadoc) { - options.addStringOption('Xdoclint:none', '-quiet') - } - } - } - - wrapper { - gradleVersion = "${gradleVersion}" - } - - task copyDeps(type: Copy) { - from configurations.runtime + configurations.testImplementation - into project.projectDir.path + "/lib" - } - - task gitChangelogTask(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { - file = new File("CHANGELOG.md"); - templateContent = """ -# Git Changelog Gradle plugin - -Changelog of Git Changelog Gradle plugin. - -{{#tags}} -## {{name}} - {{#issues}} - {{#hasIssue}} - {{#hasLink}} -### {{name}} [{{issue}}]({{link}}) {{title}} - {{/hasLink}} - {{^hasLink}} -### {{name}} {{issue}} {{title}} - {{/hasLink}} - {{/hasIssue}} - {{^hasIssue}} -### {{name}} - {{/hasIssue}} - - {{#commits}} -**{{{messageTitle}}}** - -{{#messageBodyItems}} - * {{.}} -{{/messageBodyItems}} - -[{{hash}}](https://github.com/tomasbjerre/git-changelog-gradle-plugin/commit/{{hash}}) {{authorName}} *{{commitTime}}* - - {{/commits}} - - {{/issues}} -{{/tags}} -""" - } - - task changelog(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) { - file = new File("CHANGELOG.md"); - templateContent = """ -# Serenity Core change log -{{#tags}} -## {{name}} - {{#issues}} - {{#hasLink}} -### [{{issue}}]({{link}}) {{title}} - {{/hasLink}} - {{^hasLink}} -### {{name}} - {{/hasLink}} - {{#commits}} - * [{{hash}}](https://github.com/serenity-bdd/serenity-core/commit/{{hash}}) {{{message}}} - {{/commits}} - {{/issues}} -{{/tags}} - """ - } -}