Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

Commit 68c4d68

Browse files
Remove the use of the old Gradle Plugin (#54)
1 parent a546bf4 commit 68c4d68

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

generate-sources/new-plugin/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,11 @@ compileKotlin {
3030
jvmTarget = "$JVM_TARGET_VERSION"
3131
}
3232
}
33+
34+
jar {
35+
from(
36+
zipTree(sourceSets.main.compileClasspath.find {
37+
it.absolutePath.contains(Paths.get("arrow-kt", "arrow-meta").toString())
38+
})
39+
)
40+
}

generate-sources/use-plugin/build.gradle

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,19 @@
1414
* limitations under the License.
1515
*/
1616

17-
buildscript {
18-
repositories {
19-
maven {
20-
url 'https://oss.sonatype.org/content/repositories/snapshots/'
21-
}
22-
}
23-
dependencies {
24-
classpath "io.arrow-kt:gradle-plugin:$ARROW_META_VERSION"
25-
}
26-
}
27-
2817
plugins {
2918
id "org.jetbrains.kotlin.jvm"
3019
}
3120

32-
apply plugin: "io.arrow-kt.arrow"
33-
34-
arrowMeta.plugins = ["${rootDir}/new-plugin/build/libs/new-plugin.jar".toString()]
35-
3621
dependencies {
3722
testImplementation "org.junit.jupiter:junit-jupiter:$JUNIT_VERSION"
3823
}
3924

4025
compileKotlin {
4126
kotlinOptions {
4227
jvmTarget = "$JVM_TARGET_VERSION"
28+
freeCompilerArgs += ["-Xplugin=${rootDir}/new-plugin/build/libs/new-plugin.jar",
29+
"-P", "plugin:arrow.meta.plugin.compiler:generatedSrcOutputDir=${buildDir}"]
4330
}
4431
}
4532

0 commit comments

Comments
 (0)