-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/ios-screen-height
- Loading branch information
Showing
124 changed files
with
2,353 additions
and
3,911 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 |
---|---|---|
|
@@ -41,3 +41,4 @@ core-data-shared/build/ | |
keys/my-key.asc | ||
|
||
*.asc | ||
/kotlin-js-store/ |
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,24 +1,81 @@ | ||
import org.gradle.internal.impldep.org.codehaus.plexus.util.Os | ||
|
||
plugins { | ||
`kotlin-dsl` | ||
alias(libs.plugins.multiplatform).apply(false) | ||
alias(libs.plugins.compose).apply(false) | ||
alias(libs.plugins.android.library).apply(false) | ||
alias(libs.plugins.dagger).apply(false) | ||
`maven-publish` | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
mavenLocal() | ||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") | ||
maven("https://jitpack.io") | ||
mavenLocal() | ||
} | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
google() | ||
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") | ||
} | ||
// Stub secrets to let the project sync and build without the publication values set up | ||
extra.apply { | ||
set("signing.keyId", null) | ||
set("signing.password", null) | ||
set("signing.secretKeyRingFile", null) | ||
set("ossrhUsername", null) | ||
set("ossrhPassword", null) | ||
} | ||
|
||
subprojects { | ||
afterEvaluate { | ||
afterEvaluate { | ||
configureImplicitDependencies() | ||
} | ||
} | ||
|
||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>() { | ||
kotlinOptions.jvmTarget = "17" | ||
} | ||
|
||
plugins.apply("signing") | ||
plugins.withId("maven-publish") { | ||
configure<PublishingExtension> { | ||
extensions.configure<SigningExtension> { | ||
val secretPropsFile = project.rootProject.file("local.properties") | ||
if (secretPropsFile.exists()) { | ||
secretPropsFile.reader().use { | ||
java.util.Properties().apply { | ||
load(it) | ||
} | ||
}.onEach { (name, value) -> | ||
extra.apply { | ||
set(name.toString(), value) | ||
} | ||
} | ||
} else { | ||
extra.apply { | ||
set("signing.keyId", System.getenv("SIGNING_KEY_ID")) | ||
set("signing.password", System.getenv("SIGNING_PASSWORD")) | ||
set( | ||
"signing.secretKeyRingFile", | ||
System.getenv("SIGNING_SECRET_KEY_RING_FILE") | ||
) | ||
set("ossrhUsername", System.getenv("OSSRH_USERNAME")) | ||
set("ossrhPassword", System.getenv("OSSRH_PASSWORD")) | ||
} | ||
} | ||
|
||
sign(publications) | ||
} | ||
|
||
repositories { | ||
maven { | ||
name = "sonatype" | ||
setUrl("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/") | ||
credentials { | ||
username = extra.get("ossrhUsername").toString() | ||
password = extra.get("ossrhPassword").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 |
---|---|---|
@@ -1,26 +1,11 @@ | ||
import org.apache.tools.ant.taskdefs.condition.Os | ||
|
||
plugins { | ||
`kotlin-dsl` | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
google() | ||
mavenCentral() | ||
maven(url = "https://maven.pkg.jetbrains.space/public/p/compose/dev") | ||
gradlePluginPortal() | ||
} | ||
|
||
dependencies { | ||
implementation(Dependencies.JetBrains.Compose.gradlePlugin) | ||
implementation(Dependencies.JetBrains.Kotlin.gradlePlugin) | ||
implementation(Dependencies.Android.Tools.Build.gradlePlugin) | ||
implementation(Dependencies.JetBrains.Kotlin.serializationPlugin) | ||
implementation(Dependencies.Google.Dagger.hiltGradlePlugin) | ||
} | ||
|
||
val rootDirProject = file("../") | ||
|
||
kotlin { | ||
sourceSets.getByName("main").kotlin.srcDir("buildSrc/src/main/kotlin") | ||
} | ||
compileOnly(gradleApi()) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,85 @@ | ||
import org.gradle.api.Project | ||
import org.gradle.api.publish.PublishingExtension | ||
import org.gradle.api.publish.maven.MavenPublication | ||
import org.gradle.api.publish.maven.tasks.AbstractPublishToMaven | ||
import org.gradle.api.tasks.bundling.Jar | ||
import org.gradle.kotlin.dsl.configure | ||
import org.gradle.kotlin.dsl.getValue | ||
import org.gradle.kotlin.dsl.provideDelegate | ||
import org.gradle.kotlin.dsl.registering | ||
import org.gradle.kotlin.dsl.withType | ||
import org.gradle.plugins.signing.Sign | ||
import java.io.File | ||
|
||
var MavenPublication.mppArtifactId: String | ||
get() = throw UnsupportedOperationException() | ||
set(value) { | ||
val target = this.name | ||
artifactId = if ("kotlinMultiplatform" in target) value else "$value-$target" | ||
} | ||
|
||
fun Project.configureMavenPublication( | ||
groupId: String, | ||
artifactId: String, | ||
name: String | ||
) { | ||
val javadocJar by tasks.registering(Jar::class) { | ||
archiveClassifier.set("javadoc") | ||
} | ||
|
||
extensions.configure<PublishingExtension> { | ||
publications { | ||
all { | ||
this as MavenPublication | ||
|
||
this.groupId = groupId | ||
mppArtifactId = artifactId | ||
|
||
artifact(javadocJar.get()) | ||
|
||
pom { | ||
this.name.set(name) | ||
this.description.set("Lightweight multiplatform navigation library (jvm, android, ios)") | ||
this.url.set("https://github.com/AlexGladkov/Odyssey") | ||
|
||
url.set("https://github.com/AlexGladkov/Odyssey") | ||
licenses { | ||
license { | ||
this.name.set("MIT") | ||
url.set("https://opensource.org/licenses/MIT") | ||
} | ||
} | ||
developers { | ||
developer { | ||
id.set("AlexGladkov") | ||
this.name.set("Alex Gladkov") | ||
email.set("[email protected]") | ||
} | ||
} | ||
scm { | ||
url.set("https://github.com/AlexGladkov/Odyssey") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
fun Project.getLocalProperty(key: String, file: String = "local.properties"): String? { | ||
val properties = java.util.Properties() | ||
val localProperties = File(file) | ||
if (localProperties.isFile) { | ||
java.io.InputStreamReader(java.io.FileInputStream(localProperties), Charsets.UTF_8).use { reader -> | ||
properties.load(reader) | ||
} | ||
} else error("File from not found") | ||
|
||
return properties.getProperty(key) | ||
} | ||
|
||
fun Project.configureImplicitDependencies() { | ||
val signingTasks = tasks.withType<Sign>() | ||
tasks.withType<AbstractPublishToMaven>().configureEach { | ||
dependsOn(signingTasks) | ||
} | ||
} |
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,5 @@ | ||
pluginManagement { | ||
repositories { | ||
gradlePluginPortal() | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.