Skip to content

Commit

Permalink
rewrite the rest, standarize maven publishing config
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia committed Aug 31, 2024
1 parent ef34826 commit b70157c
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 49 deletions.
7 changes: 3 additions & 4 deletions maestro-ai/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask

plugins {
Expand All @@ -13,10 +14,8 @@ application {
mainClass.set("maestro.ai.DemoAppKt")
}

plugins.withId("com.vanniktech.maven.publish") {
mavenPublish {
sonatypeHost = com.vanniktech.maven.publish.SonatypeHost.S01
}
mavenPublishing {
publishToMavenCentral(SonatypeHost.S01)
}

tasks.named<Jar>("jar") {
Expand Down
6 changes: 2 additions & 4 deletions maestro-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ tasks.named("compileKotlin") {
}

kotlin.sourceSets.all {
// Prevent build warnings for grpc"s generated opt-in code
// Prevent build warnings for grpc's generated opt-in code
languageSettings.optIn("kotlin.RequiresOptIn")
}

Expand Down Expand Up @@ -78,7 +78,6 @@ dependencies {
api(libs.jackson.dataformat.xml)
api(libs.apk.parser)


implementation(project(":maestro-ios"))
implementation(libs.google.findbugs)
implementation(libs.axml)
Expand All @@ -88,7 +87,6 @@ dependencies {
exclude(group = "org.slf4j", module = "slf4j-api")
}


testImplementation(libs.junit.jupiter.api)
testRuntimeOnly(libs.junit.jupiter.engine)
testImplementation(libs.google.truth)
Expand All @@ -111,6 +109,6 @@ mavenPublishing {
publishToMavenCentral(SonatypeHost.S01)
}

tasks.named < Test > ("test") {
tasks.named<Test>("test") {
useJUnitPlatform()
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask

plugins {
Expand All @@ -6,6 +7,10 @@ plugins {
alias(libs.plugins.mavenPublish)
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.S01)
}

dependencies {
implementation(project(":maestro-utils"))

Expand All @@ -28,18 +33,12 @@ java {
targetCompatibility = JavaVersion.VERSION_1_8
}

tasks.named("compileKotlin", KotlinCompilationTask) {
tasks.named("compileKotlin", KotlinCompilationTask::class.java) {
compilerOptions {
freeCompilerArgs.addAll("-Xjdk-release=1.8")
}
}

plugins.withId("com.vanniktech.maven.publish") {
mavenPublish {
sonatypeHost = "S01"
}
}

test {
tasks.named<Test>("test") {
useJUnitPlatform()
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask

plugins {
Expand All @@ -6,25 +7,23 @@ plugins {
alias(libs.plugins.mavenPublish)
}

plugins.withId("com.vanniktech.maven.publish") {
mavenPublish {
sonatypeHost = "S01"
}
mavenPublishing {
publishToMavenCentral(SonatypeHost.S01)
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

tasks.named("compileKotlin", KotlinCompilationTask) {
tasks.named("compileKotlin", KotlinCompilationTask::class.java) {
compilerOptions {
freeCompilerArgs.addAll("-Xjdk-release=1.8")
}
}

dependencies {
implementation(project(path: ":maestro-client"))
implementation(project(":maestro-client"))

api(libs.jackson.core.databind)
api(libs.jackson.module.kotlin)
Expand All @@ -34,6 +33,6 @@ dependencies {
testImplementation(libs.google.truth)
}

test {
tasks.named<Test>("test") {
useJUnitPlatform()
}
2 changes: 1 addition & 1 deletion maestro-orchestra/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask

plugins {
id("maven-publish")
Expand Down
20 changes: 0 additions & 20 deletions maestro-proto/build.gradle

This file was deleted.

20 changes: 20 additions & 0 deletions maestro-proto/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import com.vanniktech.maven.publish.SonatypeHost

plugins {
id("maven-publish")
java
alias(libs.plugins.mavenPublish)
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.S01)
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

tasks.named<Jar>("jar") {
from("src/main/proto/maestro_android.proto")
}
8 changes: 3 additions & 5 deletions maestro-studio/server/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import com.vanniktech.maven.publish.SonatypeHost
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask

plugins {
Expand All @@ -12,10 +13,8 @@ application {
mainClass = "maestro.studio.ServerKt"
}

plugins.withId("com.vanniktech.maven.publish") {
mavenPublish {
sonatypeHost = "S01"
}
mavenPublishing {
publishToMavenCentral(SonatypeHost.S01)
}

def copyWebFiles = tasks.register("copyWebFiles", Copy.class) {
Expand Down Expand Up @@ -47,7 +46,6 @@ dependencies {
implementation(project(":maestro-orchestra"))
implementation(project(":maestro-client"))
implementation(project(":maestro-utils"))
implementation platform("org.http4k:http4k-bom:4.34.2.0") // TODO remove
implementation(libs.ktor.server.core)
implementation(libs.ktor.server.netty)
implementation(libs.ktor.server.cors)
Expand Down

0 comments on commit b70157c

Please sign in to comment.