class FoocadMetaBuild : MetaBuild() { val group = "uk.co.nickthecoder" val version = "3.0" val tokenName = "gitLabPrivateToken" val kotlinVersion = "2.1.0" val glokVersion = "1.0beta8" val featherVersion= "2.1.7" val feather2glokVersion = "0.4" val junitVersion = "4.11" val httpclientVersion = "4.5.12" val jtsVersion = "1.18.2" meth build() { installGradle() repositories( mavenCentral(), gitLabRepository( "glok", "nickthecoder/glok" ), gitLabRepository( "feather2", "nickthecoder/feather2" ), gitLabRepository( "feather2glok", "nickthecoder/feather2glok" ) ) // Now we define each subproject. Simple projects will only have a single (unnamed) project. // ==== foocad-core ==== val foocadCore = project("foocad-core").apply { kotlin().apply { implementation( "org.locationtech.jts:jts-core:$jtsVersion" ) testImplementation( "junit:junit:$junitVersion" ) } dokkaPartial() publishing().apply { publishToGitLab("nickthecoder/foocad", tokenName) } } // ==== foocad-build ==== val foocadBuild = project("foocad-build").apply { kotlin().apply { implementation( foocadCore ) implementation( "uk.co.nickthecoder:glok-model:$glokVersion" ) // Required for OctoPrint uploads implementation("org.apache.httpcomponents:httpclient:$httpclientVersion") implementation("org.apache.httpcomponents:httpmime:$httpclientVersion") testImplementation("junit:junit:$junitVersion") } dokkaPartial() publishing().apply { publishToGitLab("nickthecoder/foocad", tokenName) } } // root val root = project().apply { application( "uk.co.nickthecoder.foocad.FooCAD" ) kotlin().apply { implementation( foocadCore ) implementation( foocadBuild ) implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion") implementation("uk.co.nickthecoder:glok-core:$glokVersion") implementation("uk.co.nickthecoder:glok-model:$glokVersion") implementation("uk.co.nickthecoder:glok-dock:$glokVersion") implementation("uk.co.nickthecoder:glok-mybar:$glokVersion") implementation("uk.co.nickthecoder:feather2-core:$featherVersion") implementation("uk.co.nickthecoder:feather2-runtime:$featherVersion") implementation("uk.co.nickthecoder:feather2glok:$feather2glokVersion") } dokkaMultiModule().moduleName( "FooCAD" ).version( version ) exec( "ntc", "publishToNTC.feather", "--", version ).apply { dependsOn( "distZip", "dokkaHtmlMultiModule" ) } defaultTasks( "installDist" ) } buildGradleScripts() } func main(args: String...) { FoocadMetaBuild().build() } }