Skip to content

Commit

Permalink
Migrate from deprecated and outdated APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
xSAVIKx committed Mar 3, 2024
1 parent 575a77b commit b96913e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 27 deletions.
8 changes: 4 additions & 4 deletions bintray.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ def pomConfig = {
}
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
tasks.register('javadocJar', Jar) {
getArchiveClassifier().set("javadoc")
from javadoc
}

task sourcesJar(type: Jar) {
classifier = 'sources'
tasks.register('sourcesJar', Jar) {
getArchiveClassifier().set("sources")
from sourceSets.main.allSource
}

Expand Down
31 changes: 15 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'biz.aQute.bnd:biz.aQute.bnd.gradle:4.3.1'
Expand Down Expand Up @@ -37,7 +37,7 @@ checkstyle {
// maxWarnings = 0
}

tasks.withType(Checkstyle) {
tasks.withType(Checkstyle).configureEach {
reports {
xml.enabled true
// html.destination rootProject.file("build/reports/checkstyle.html")
Expand All @@ -47,7 +47,7 @@ tasks.withType(Checkstyle) {

jacoco {
toolVersion = "0.8.5"
reportsDir = file("${buildDir}/jacocoHtml")
getReportsDirectory().set(file("${buildDir}/jacocoHtml"))
}

jacocoTestReport {
Expand Down Expand Up @@ -90,7 +90,7 @@ group = 'name.neuhalfen.projects.crypto.bouncycastle.openpgp'
version = '2.3.0'

repositories {
jcenter()
mavenCentral()
}

sourceSets {
Expand All @@ -111,7 +111,7 @@ configurations {
integrationTestRuntime.extendsFrom testRuntime
}

task integrationTest(type: Test) {
tasks.register('integrationTest', Test) {
description = 'Runs the integration tests.'
group = LifecycleBasePlugin.VERIFICATION_GROUP
testClassesDirs = sourceSets.integrationTest.output.classesDirs
Expand All @@ -123,20 +123,19 @@ check.dependsOn integrationTest


dependencies {
compile 'org.bouncycastle:bcprov-jdk15on:1.67'
compile 'org.bouncycastle:bcpg-jdk15on:1.67'
implementation 'org.bouncycastle:bcprov-jdk15on:1.67'
implementation 'org.bouncycastle:bcpg-jdk15on:1.67'

compile 'org.slf4j:slf4j-api:1.7.30'
implementation 'org.slf4j:slf4j-api:1.7.30'

// @Nullable and friends are not needed at runtime
compile 'com.google.code.findbugs:jsr305:3.0.2'

testCompile 'junit:junit:4.13'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile 'org.mockito:mockito-core:3.2.4'
testCompile 'org.concordion:concordion-api-documentation-extension:0.0.4'
testCompile 'ch.qos.logback:logback-classic:1.2.3'
implementation 'com.google.code.findbugs:jsr305:3.0.2'

testImplementation 'junit:junit:4.13'
testImplementation 'org.hamcrest:hamcrest-all:1.3'
testImplementation 'org.mockito:mockito-core:3.2.4'
testImplementation 'org.concordion:concordion-api-documentation-extension:0.0.4'
testImplementation 'ch.qos.logback:logback-classic:1.2.3'
}


Expand Down Expand Up @@ -164,7 +163,7 @@ if (hasProperty('bintray_Username')) {
apply from: 'website.gradle'

wrapper {
gradleVersion = '6.5'
gradleVersion = '6.9.4'
}

// Generate OSGI bundle metadata
Expand Down
17 changes: 10 additions & 7 deletions website.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import name.neuhalfen.concordion.transform.ConcordionHtmlToMarkdownTransformer
// https://github.com/ajoberstar/gradle-git-publish


task prepareSpecsForCMS(type: Copy, dependsOn: ['prepareCmsBuildRoot', 'test']) {
tasks.register('prepareSpecsForCMS', Copy) {
setDependsOn(['prepareCmsBuildRoot', 'test'])
description 'Transform the build output of concordion to include it in the CMS'

from(fileTree("${specifications_prepareForCms_source}")) {
Expand All @@ -16,24 +17,26 @@ task prepareSpecsForCMS(type: Copy, dependsOn: ['prepareCmsBuildRoot', 'test'])
filter(ConcordionHtmlToMarkdownTransformer)
}

task removeOldCMSBuild(type: Delete) {
tasks.register('removeOldCMSBuild', Delete) {
delete "${specifications_cms_target}"
delete "${cms_BuildRoot}"
}

task prepareCmsBuildRoot(type: Copy, dependsOn: ['removeOldCMSBuild']) {
tasks.register('prepareCmsBuildRoot', Copy) {
dependsOn['removeOldCMSBuild']
from("${specifications_cms_cmsdRoot}")
into "${cms_BuildRoot}"
}



task generateWebsite(type: Exec, dependsOn: ['prepareSpecsForCMS']) {
tasks.register('generateWebsite', Exec) {
dependsOn['prepareSpecsForCMS']
commandLine = [hugo, '--cleanDestinationDir', '--destination', "${specifications_cms_target}", '--enableGitInfo']
workingDir = file("${cms_BuildRoot}")
}

task previewWebsite(type: Exec, dependsOn: ['generateWebsite']) {
tasks.register('previewWebsite', Exec) {
dependsOn['generateWebsite']
commandLine = [hugo, 'server', '--debug', '--watch', '--enableGitInfo']
workingDir = file("${cms_BuildRoot}")
}
Expand Down Expand Up @@ -62,4 +65,4 @@ gitPublish {
commitMessage = 'Publishing github pages' // defaults to 'Generated by gradle-git-publish'
}

task publishWebsite(dependsOn: ['generateWebsite', 'gitPublishPush'])
tasks.register('publishWebsite') { setDependsOn(['generateWebsite', 'gitPublishPush']) }

0 comments on commit b96913e

Please sign in to comment.