forked from MarathonLabs/marathon
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move configuration to a convention plugin
- Loading branch information
Sergey Chelombitko
committed
Aug 3, 2024
1 parent
e979c88
commit 7c19e17
Showing
18 changed files
with
333 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
#!/usr/bin/env bash | ||
cd `dirname $0`/.. | ||
|
||
TARGETS="" | ||
for i in ":core" ":vendor:vendor-android:base" ":vendor:vendor-android:ddmlib" ":marathon-gradle-plugin" ":report:execution-timeline" ":report:html-report"; do | ||
TARGETS="$TARGETS $i:publishDefaultPublicationToMavenLocal" | ||
done | ||
|
||
if [ ! -z "$TRAVIS_TAG" ] | ||
if [ -n "$TRAVIS_TAG" ] | ||
then | ||
echo "on a tag -> deploy release version $TRAVIS_TAG" | ||
./gradlew $TARGETS -PreleaseMode=RELEASE | ||
release_mode="RELEASE" | ||
else | ||
echo "not on a tag -> deploy snapshot version" | ||
./gradlew $TARGETS -PreleaseMode=SNAPSHOT | ||
release_mode="SNAPSHOT" | ||
fi | ||
|
||
./gradlew -PreleaseMode="$release_mode" publishToMavenLocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,3 @@ | ||
import io.gitlab.arturbosch.detekt.extensions.DetektExtension | ||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
plugins { | ||
id("org.jetbrains.kotlin.jvm") apply false | ||
id("io.gitlab.arturbosch.detekt") apply false | ||
} | ||
|
||
allprojects { | ||
group = "com.github.badoo.marathon" | ||
|
||
plugins.withId("org.jetbrains.kotlin.jvm") { | ||
plugins.apply("io.gitlab.arturbosch.detekt") | ||
|
||
dependencies.add("implementation", dependencies.platform(Libraries.kotlinBom)) | ||
dependencies.add("implementation", dependencies.platform(Libraries.kotlinCoroutinesBom)) | ||
} | ||
|
||
plugins.withId("java") { | ||
extensions.configure<JavaPluginExtension> { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
} | ||
|
||
plugins.withId("io.gitlab.arturbosch.detekt") { | ||
configure<DetektExtension> { | ||
buildUponDefaultConfig = true | ||
config.from("$rootDir/detekt.yml") | ||
} | ||
} | ||
|
||
tasks.withType<KotlinCompile>().configureEach { | ||
compilerOptions { | ||
jvmTarget.set(JvmTarget.JVM_17) | ||
freeCompilerArgs.addAll( | ||
"-Xjvm-default=all", | ||
"-opt-in=kotlin.RequiresOptIn" | ||
) | ||
} | ||
} | ||
} | ||
|
||
tasks.register<Delete>("clean") { | ||
delete(layout.buildDirectory) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
plugins { | ||
`java-gradle-plugin` | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation(libs.detekt.gradle.plugin) | ||
implementation(libs.kotlin.gradle.plugin) | ||
} | ||
|
||
gradlePlugin { | ||
plugins { | ||
create("marathonConventionsPlugin") { | ||
id = "com.badoo.marathon.conventions" | ||
implementationClass = "com.badoo.marathon.conventions.MarathonConventionsPlugin" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../gradle/libs.versions.toml |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.