1616
1717import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
1818import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
19+ import de.undercouch.gradle.tasks.download.Download
1920import net.dv8tion.jda.tasks.Version
2021import net.dv8tion.jda.tasks.applyAudioExclusions
2122import net.dv8tion.jda.tasks.applyOpusExclusions
@@ -35,6 +36,7 @@ plugins {
3536 alias(libs.plugins.versions)
3637 alias(libs.plugins.version.catalog.update)
3738 alias(libs.plugins.jreleaser)
39+ alias(libs.plugins.download)
3840}
3941
4042
@@ -45,7 +47,7 @@ plugins {
4547// //////////////////////////////////
4648
4749projectEnvironment {
48- version = Version (major = " 5 " , minor = " 6 " , revision = " 1 " , classifier = null )
50+ version = Version (major = " 6 " , minor = " 0 " , revision = " 0 " , classifier = " rc.1 " )
4951}
5052
5153artifactFilters {
@@ -88,10 +90,7 @@ configure<SourceSetContainer> {
8890// //
8991// //////////////////////////////////
9092
91- val recipeParserClasspath by configurations.creating
92-
9393repositories {
94- mavenLocal()
9594 mavenCentral()
9695}
9796
@@ -160,8 +159,6 @@ dependencies {
160159
161160 // For authoring tests for any kind of Recipe
162161 testImplementation(" org.openrewrite:rewrite-test" )
163-
164- recipeParserClasspath(" net.dv8tion:JDA:5.6.1" )
165162}
166163
167164fun isNonStable (version : String ): Boolean {
@@ -299,7 +296,9 @@ val javadoc by tasks.getting(Javadoc::class) {
299296 dependsOn(generateJavaSources)
300297 source = generateJavaSources.get().source
301298
302- exclude(" net/dv8tion/jda/internal" )
299+ exclude {
300+ it.file.absolutePath.contains(" internal" , ignoreCase= false )
301+ }
303302}
304303
305304val javadocJar by tasks.registering(Jar ::class ) {
@@ -341,11 +340,11 @@ val build by tasks.getting(Task::class) {
341340 shadowJar.mustRunAfter(sourcesJar)
342341}
343342
344- val downloadRecipeClasspath by tasks.registering(Copy ::class ) {
345- from(recipeParserClasspath)
346- into( " src/test/resources/META-INF/rewrite/classpath " )
347-
348- include( " JDA-*.jar " )
343+ val downloadRecipeClasspath by tasks.registering(Download ::class ) {
344+ val targetVersion = " 5.6.1 "
345+ src( " https://repo.maven.apache.org/maven2/net/dv8tion/JDA/ $targetVersion /JDA- $targetVersion .jar " )
346+ dest( " src/test/resources/META-INF/rewrite/classpath/JDA- $targetVersion .jar " )
347+ overwrite( false )
349348}
350349
351350tasks.named(" processTestResources" ).configure {
0 commit comments