-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #266 from vivid-money/publish-elmslie-3.0
Elmslie 3.0
- Loading branch information
Showing
246 changed files
with
3,092 additions
and
5,619 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
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 was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
@file:Suppress("UnstableApiUsage") | ||
|
||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
dependencies { | ||
implementation(libs.android.gradlePlugin) | ||
implementation(libs.detekt.gradlePlugin) | ||
implementation(libs.dokka.gradlePlugin) | ||
implementation(libs.kotlin.gradlePlugin) | ||
implementation(libs.mavenPublishPlugin) | ||
} |
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,20 @@ | ||
@file:Suppress("UnstableApiUsage") | ||
|
||
pluginManagement { | ||
repositories { | ||
gradlePluginPortal() | ||
google() | ||
mavenCentral() | ||
} | ||
} | ||
|
||
dependencyResolutionManagement { | ||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
versionCatalogs.create("libs").from(files("../gradle/libs.versions.toml")) | ||
} | ||
|
||
rootProject.name = "build-logic" |
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,3 @@ | ||
import org.gradle.api.JavaVersion | ||
|
||
val JvmTarget = JavaVersion.VERSION_11 |
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,12 @@ | ||
abstract class PublishingExtension { | ||
|
||
internal lateinit var pom: Pom | ||
|
||
fun pom( | ||
block: Pom.() -> Unit, | ||
) { | ||
pom = Pom().apply(block) | ||
} | ||
|
||
data class Pom(var name: String = "", var description: String = "") | ||
} |
36 changes: 36 additions & 0 deletions
36
build-logic/src/main/kotlin/elmslie.android-lib.gradle.kts
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,36 @@ | ||
@file:Suppress("UnstableApiUsage") | ||
|
||
plugins { | ||
id("com.android.library") | ||
id("org.jetbrains.kotlin.android") | ||
id("org.jetbrains.dokka") | ||
id("elmslie.base-lib") | ||
id("elmslie.detekt") | ||
id("elmslie.tests-convention") | ||
} | ||
|
||
android { | ||
compileSdk = 33 | ||
buildToolsVersion = "31.0.0" | ||
|
||
defaultConfig { minSdk = 21 } | ||
|
||
lint { | ||
checkReleaseBuilds = false | ||
checkDependencies = true | ||
|
||
ignoreTestSources = true | ||
abortOnError = true | ||
warningsAsErrors = true | ||
|
||
htmlReport = true | ||
xmlReport = false | ||
} | ||
|
||
compileOptions { | ||
targetCompatibility = JvmTarget | ||
sourceCompatibility = JvmTarget | ||
} | ||
} | ||
|
||
val catalog = extensions.getByType<VersionCatalogsExtension>().named("libs") |
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,8 @@ | ||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
tasks.withType<JavaCompile> { | ||
targetCompatibility = JvmTarget.toString() | ||
sourceCompatibility = JvmTarget.toString() | ||
} | ||
|
||
tasks.withType<KotlinCompile> { kotlinOptions.jvmTarget = JvmTarget.toString() } |
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,18 @@ | ||
@file:Suppress("UnstableApiUsage") | ||
|
||
import io.gitlab.arturbosch.detekt.Detekt | ||
|
||
plugins { id("io.gitlab.arturbosch.detekt") } | ||
|
||
detekt { | ||
parallel = true | ||
config.setFrom("$rootDir/detekt/detekt.yml") | ||
} | ||
|
||
tasks.withType<Detekt> { | ||
reports { | ||
html.required.set(true) | ||
xml.required.set(false) | ||
txt.required.set(false) | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
build-logic/src/main/kotlin/elmslie.kotlin-multiplatform-lib.gradle.kts
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,38 @@ | ||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget | ||
import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl | ||
|
||
plugins { | ||
kotlin("multiplatform") | ||
id("elmslie.detekt") | ||
} | ||
|
||
kotlin { | ||
applyDefaultHierarchyTemplate { | ||
common { | ||
group("commonWeb") { | ||
withJs() | ||
withWasm() | ||
} | ||
} | ||
} | ||
|
||
jvm { | ||
compilations.all { | ||
compilerOptions.configure { | ||
jvmTarget.set(JvmTarget.JVM_11) | ||
} | ||
} | ||
} | ||
|
||
iosArm64() | ||
iosSimulatorArm64() | ||
iosX64() | ||
|
||
js(IR) { | ||
browser() | ||
} | ||
@OptIn(ExperimentalWasmDsl::class) | ||
wasmJs { | ||
browser() | ||
} | ||
} |
Oops, something went wrong.