-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
140 additions
and
129 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,6 +1,10 @@ | ||
/.idea/ | ||
/build/ | ||
/.gradle/ | ||
/convention-plugins/.gradle/ | ||
/convention-plugins/build/ | ||
.envrc | ||
*.iml | ||
.gradle | ||
.idea | ||
.DS_Store | ||
build | ||
captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties | ||
xcuserdata |
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,67 +1,6 @@ | ||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi | ||
|
||
plugins { | ||
kotlin("multiplatform") version "1.9.0" | ||
id("com.android.library") | ||
id("convention.publication") | ||
} | ||
|
||
group = "com.github.asm0dey" | ||
version = "0.0.1.2" | ||
|
||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
|
||
@OptIn(ExperimentalKotlinGradlePluginApi::class) | ||
kotlin { | ||
targetHierarchy.default() | ||
jvm { | ||
compilations.all { | ||
kotlinOptions.jvmTarget = "1.8" | ||
} | ||
testRuns["test"].executionTask.configure { | ||
useJUnitPlatform() | ||
} | ||
} | ||
android { | ||
publishLibraryVariants("release", "debug") | ||
} | ||
iosArm64 { | ||
binaries { | ||
framework { | ||
baseName = "library" | ||
} | ||
} | ||
} | ||
iosSimulatorArm64() { | ||
binaries { | ||
framework { | ||
baseName = "library" | ||
} | ||
} | ||
} | ||
linuxX64() | ||
sourceSets { | ||
val commonTest by getting { | ||
dependencies { | ||
implementation(kotlin("test")) | ||
} | ||
} | ||
} | ||
} | ||
|
||
android { | ||
namespace = "com.github.asm0dey.dummylib" | ||
compileSdk = 33 | ||
defaultConfig { | ||
minSdk = 24 | ||
targetSdk = 33 | ||
} | ||
buildTypes { | ||
getByName("release") { | ||
isMinifyEnabled = false | ||
} | ||
} | ||
id("root.publication") | ||
//trick: for the same plugin versions in all sub-modules | ||
alias(libs.plugins.androidLibrary).apply(false) | ||
alias(libs.plugins.kotlinMultiplatform).apply(false) | ||
} |
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,11 +1,7 @@ | ||
plugins { | ||
`kotlin-dsl` // Is needed to turn our build logic written in Kotlin into the Gradle Plugin | ||
} | ||
|
||
repositories { | ||
gradlePluginPortal() // To use 'maven-publish' and 'signing' plugins in our own plugin | ||
`kotlin-dsl` | ||
} | ||
|
||
dependencies { | ||
implementation("io.github.gradle-nexus.publish-plugin:io.github.gradle-nexus.publish-plugin.gradle.plugin:2.0.0-rc-1") | ||
implementation(libs.nexus.publish) | ||
} |
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,21 @@ | ||
pluginManagement { | ||
repositories { | ||
google() | ||
gradlePluginPortal() | ||
mavenCentral() | ||
} | ||
} | ||
|
||
dependencyResolutionManagement { | ||
repositories { | ||
google() | ||
gradlePluginPortal() | ||
mavenCentral() | ||
} | ||
|
||
versionCatalogs { | ||
create("libs") { | ||
from(files("../gradle/libs.versions.toml")) | ||
} | ||
} | ||
} |
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
11 changes: 11 additions & 0 deletions
11
convention-plugins/src/main/kotlin/root.publication.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,11 @@ | ||
plugins { | ||
id("io.github.gradle-nexus.publish-plugin") | ||
} | ||
|
||
nexusPublishing { | ||
// Configure maven central repository | ||
// https://github.com/gradle-nexus/publish-plugin#publishing-to-maven-central-via-sonatype-ossrh | ||
repositories { | ||
sonatype() | ||
} | ||
} |
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,8 +1,16 @@ | ||
kotlin.code.style=official | ||
kotlin.mpp.androidSourceSetLayoutVersion=2 | ||
android.useAndroidX=true | ||
org.gradle.jvmargs=-Xmx4096m | ||
# Improves build time via enabling the gradle build cache | ||
#Gradle | ||
org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M" | ||
org.gradle.caching=true | ||
org.gradle.configuration-cache=true | ||
|
||
#Kotlin | ||
kotlin.code.style=official | ||
kotlin.js.compiler=ir | ||
|
||
#MPP | ||
kotlin.mpp.enableCInteropCommonization=true | ||
kotlin.mpp.androidSourceSetLayoutVersion=2 | ||
|
||
#Android | ||
android.useAndroidX=true | ||
android.nonTransitiveRClass=true |
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,14 @@ | ||
[versions] | ||
agp = "8.0.2" | ||
kotlin = "1.9.0" | ||
nexus-publish = "2.0.0-rc-1" | ||
android-minSdk = "24" | ||
android-compileSdk = "33" | ||
|
||
[libraries] | ||
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } | ||
nexus-publish = { module = "io.github.gradle-nexus.publish-plugin:io.github.gradle-nexus.publish-plugin.gradle.plugin", version.ref = "nexus-publish" } | ||
|
||
[plugins] | ||
androidLibrary = { id = "com.android.library", version.ref = "agp" } | ||
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } |
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,6 +1,6 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip | ||
networkTimeout=10000 | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
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,43 @@ | ||
plugins { | ||
alias(libs.plugins.kotlinMultiplatform) | ||
alias(libs.plugins.androidLibrary) | ||
id("module.publication") | ||
} | ||
|
||
kotlin { | ||
targetHierarchy.default() | ||
jvm() | ||
androidTarget { | ||
publishLibraryVariants("release", "debug") | ||
compilations.all { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
} | ||
} | ||
iosX64() | ||
iosArm64() | ||
iosSimulatorArm64() | ||
linuxX64() | ||
|
||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
//put your multiplatform dependencies here | ||
} | ||
} | ||
val commonTest by getting { | ||
dependencies { | ||
implementation(libs.kotlin.test) | ||
} | ||
} | ||
} | ||
} | ||
|
||
android { | ||
namespace = "com.github.asm0dey.dummylib" | ||
compileSdk = libs.versions.android.compileSdk.get().toInt() | ||
defaultConfig { | ||
minSdk = libs.versions.android.minSdk.get().toInt() | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
|
@@ -6,4 +6,4 @@ class FibiTest { | |
fun `test 3rd element`(){ | ||
assertEquals(7, fibi.take(3).last()) | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
pluginManagement { | ||
includeBuild("convention-plugins") | ||
repositories { | ||
google() | ||
gradlePluginPortal() | ||
mavenCentral() | ||
} | ||
resolutionStrategy { | ||
eachPlugin { | ||
if (requested.id.namespace == "com.android") { | ||
useModule("com.android.tools.build:gradle:7.4.1") | ||
} | ||
} | ||
} | ||
|
||
dependencyResolutionManagement { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
} | ||
|
||
rootProject.name = "dummylib-multiplatform" | ||
includeBuild("convention-plugins") | ||
include(":library") |
Empty file.
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.