File tree Expand file tree Collapse file tree
build-logic/src/main/kotlin/net/kautler Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11/*
2- * Copyright 2019-2023 Björn Kautler
2+ * Copyright 2019-2025 Björn Kautler
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
1616
1717package net.kautler
1818
19- import aQute.bnd.gradle.BundleTaskConvention
20-
2119plugins {
2220 id(" biz.aQute.bnd.builder" )
2321}
2422
2523tasks.jar {
26- @Suppress( " DEPRECATION " )
27- withConvention( BundleTaskConvention :: class ) {
24+ bundle {
25+ properties.put( " version " , archiveVersion)
2826 bnd(
29- archiveVersion.map { version ->
30- mapOf (
31- " Import-Package" to listOf (
32- listOf (
33- " org.javacord.*" ,
34- " resolution:=optional"
35- ).joinToString(" ;" ),
36- listOf (
37- " net.dv8tion.jda.*" ,
38- " resolution:=optional"
39- ).joinToString(" ;" ),
40- " *"
41- ).joinToString(),
42- " Export-Package" to listOf (
43- " net.kautler.command.api.*" ,
44- " version=$version " ,
45- " -noimport:=true"
27+ mapOf (
28+ " Import-Package" to listOf (
29+ listOf (
30+ " org.javacord.*" ,
31+ " resolution:=optional"
32+ ).joinToString(" ;" ),
33+ listOf (
34+ " net.dv8tion.jda.*" ,
35+ " resolution:=optional"
4636 ).joinToString(" ;" ),
47- // work-around for https://github.com/bndtools/bnd/issues/2227
48- " -fixupmessages" to """ ^Classes found in the wrong directory: \\{META-INF/versions/9/module-info\\.class=module-info}$"""
49- )
50- .entries
51- .joinToString(" \n " ) { (key, value) -> " $key =$value " }
52- }
37+ " *"
38+ ).joinToString(),
39+ " Export-Package" to listOf (
40+ " net.kautler.command.api.*" ,
41+ " version=\$ {version}" ,
42+ " -noimport:=true"
43+ ).joinToString(" ;" )
44+ )
5345 )
5446 }
5547}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ jda = "4.4.0_352"
2323log4j = " 2.20.0"
2424
2525build-codenarc = " 3.7.0-groovy-4.0"
26- build-gradle-plugin-bndBuilder = " 5.3.0 "
26+ build-gradle-plugin-bndBuilder = " 7.2.3 "
2727# fix or remove component metadata rule in gradle/build-logic/settings.gradle.kts on update
2828build-gradle-plugin-github = " 3.0.1"
2929build-gradle-plugin-nexus-publish = " 0.4.0"
You can’t perform that action at this time.
0 commit comments