File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed
src/main/kotlin/dev/slne/surf/surfapi/gradle/platform/core Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ plugins {
2020group = groupId
2121version = buildString {
2222 append(mcVersion)
23- append(" -1.7.1 " )
23+ append(" -1.8.0 " )
2424 if (snapshot) append(" -SNAPSHOT" )
2525}
2626
Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ open class CoreSurfExtension @Inject constructor(objects: ObjectFactory) :
1515 internal val surfRedisVersion = objects.property<String >()
1616 internal val surfRedisRelocation = objects.property<String >()
1717
18+ internal val withSurfDatabaseR2dbc = objects.property<Boolean >().convention(false )
19+ internal val surfDatabaseR2dbcVersion = objects.property<String >()
20+ internal val surfDatabaseR2dbcRelocation = objects.property<String >()
21+
1822 fun withSurfRedis (version : String , relocation : String ) {
1923 withSurfRedis.set(true )
2024 withSurfRedis.finalizeValue()
@@ -24,6 +28,15 @@ open class CoreSurfExtension @Inject constructor(objects: ObjectFactory) :
2428 surfRedisRelocation.finalizeValue()
2529 }
2630
31+ fun withSurfDatabaseR2dbc (version : String , relocation : String ) {
32+ withSurfDatabaseR2dbc.set(true )
33+ withSurfDatabaseR2dbc.finalizeValue()
34+ surfDatabaseR2dbcVersion.set(version)
35+ surfDatabaseR2dbcVersion.finalizeValue()
36+ surfDatabaseR2dbcRelocation.set(relocation)
37+ surfDatabaseR2dbcRelocation.finalizeValue()
38+ }
39+
2740 fun withCloudCommon () {
2841 cloudModule.set(SurfCloudModules .COMMON )
2942 }
Original file line number Diff line number Diff line change @@ -31,6 +31,18 @@ internal abstract class AbstractCoreSurfPlugin<E : CoreSurfExtension>(
3131 }
3232 }
3333
34+ if (extension.withSurfDatabaseR2dbc.get()) {
35+ dependencies {
36+ add(API , " dev.slne.surf:surf-database-r2dbc:${extension.surfDatabaseR2dbcVersion.get()} " )
37+ }
38+
39+ tasks.withType<ShadowJar >().configureEach {
40+ doFirst {
41+ relocate(" dev.slne.surf.database.r2dbc" , extension.surfDatabaseR2dbcRelocation.get())
42+ }
43+ }
44+ }
45+
3446 afterEvaluated1(extension)
3547 }
3648
You can’t perform that action at this time.
0 commit comments