Skip to content

Commit

Permalink
Update to Gradle 8.2, remove reference to artifactory, fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesrwelch committed Aug 8, 2024
1 parent 5e602e9 commit ed592b8
Show file tree
Hide file tree
Showing 10 changed files with 545 additions and 44 deletions.
6 changes: 3 additions & 3 deletions .sdkmanrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=17.0.1-tem
gradle=7.3.3
groovy=3.0.9
java=17.0.6-tem
gradle=8.2
groovy=3.0.17
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2020-2023 University of Oxford and NHS England
Copyright 2020-2024 University of Oxford and NHS England

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
46 changes: 42 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@ import java.nio.file.Files
buildscript {
repositories {
mavenLocal()
maven {url 'https://jenkins.cs.ox.ac.uk/artifactory/plugins-snapshot'}
maven {url 'https://jenkins.cs.ox.ac.uk/artifactory/plugins-release'}
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
//mavenCentral()
maven { url "https://mauro-repository.com/libs-release-local" }
maven {
url "https://mauro-repository.com/plugins-release-local"
}

}
dependencies {
classpath "uk.ac.ox.softeng.maurodatamapper.gradle:mdm-gradle-plugin:$mdmGradlePluginVersion"
classpath "org.maurodata:mdm-gradle-plugin:1.4.0"
}

}


plugins {
id 'groovy'
id 'java-library'
Expand All @@ -20,6 +26,14 @@ plugins {

apply plugin: 'uk.ac.ox.softeng.maurodatamapper.gradle.mdm-gradle'

repositories {
mavenLocal()
maven { url "https://plugins.gradle.org/m2/" }
mavenCentral()
maven { url "https://mauro-repository.com/libs-release-local" }

}

// Define new "generation" sourceset for generating the dita library
sourceSets {
// Source is the generation code and the antlr generated source
Expand Down Expand Up @@ -61,6 +75,8 @@ license {
])
}



// Customise the antlr grammer source to output to the "generation/antlr" directory
// Standard format of src dirs is "sourcesetname/codetype"
generateGrammarSource {
Expand Down Expand Up @@ -95,22 +111,44 @@ tasks.compileGenerationJava.dependsOn 'generateGrammarSource','replaceTabsWithSp
tasks.generateDitaSource.dependsOn 'generationClasses'
tasks.compileJava.dependsOn 'generateDitaSource'
tasks.sourcesJar.dependsOn 'generateDitaSource'
tasks.licenseGeneration.dependsOn "generateGrammarSource", "generateGenerationGrammarSource", "generateDitaSource"
tasks.licenseTest.dependsOn "generateGrammarSource", "generateGenerationGrammarSource", "generateDitaSource", "generateTestGrammarSource"
tasks.licenseMain.dependsOn "generateDitaSource"
tasks.cpdCheck.dependsOn "generateGrammarSource", "generateGenerationGrammarSource", "generateDitaSource", "generateTestGrammarSource"


checkstyleGeneration{
// Dont bother scanning the generated antlr code
exclude '**/ebnf/parser/**'
}

codenarc {
configFile = rootProject.file("config/codenarc/codenarc.groovy")

}

codenarcGeneration {
compilationClasspath = sourceSets.generation.compileClasspath + sourceSets.generation.output
// Dont bother scanning the generated code, we've cleaned up most of the issues, the ones remaining are impossible to fix due to the source they're generated from
exclude '**/dita/elements/langref/**'
exclude '**/parser/**'
}

codenarcMain {
compilationClasspath = sourceSets.main.compileClasspath + sourceSets.main.output
// Dont bother scanning the generated code, we've cleaned up most of the issues, the ones remaining are impossible to fix due to the source they're generated from
exclude '**/dita/elements/langref/**'
exclude '**/parser/**'
}

tasks.cpdCheck {
exclude '**/EbnfLexer.java'
exclude '**/EbnfParser.java'
ignoreFailures true
}



tasks.spotbugsGeneration{
onlyAnalyze.add('uk.ac.ox.softeng.maurodatamapper.dita.*')
}
Expand Down
Loading

0 comments on commit ed592b8

Please sign in to comment.