-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Playground project was created. Sandbox application was moved …
…to playground. Maven publication convention plugin was created.
- Loading branch information
Showing
30 changed files
with
457 additions
and
67 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
66 changes: 66 additions & 0 deletions
66
build-system/conventions/src/main/kotlin/convention.maven-publish.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,66 @@ | ||
import com.android.build.gradle.internal.api.BaseVariantOutputImpl | ||
import org.gradle.api.publish.maven.MavenPublication | ||
import org.gradle.kotlin.dsl.create | ||
import org.gradle.kotlin.dsl.get | ||
import utils.findPropertyOrDefault | ||
import utils.versionInfo | ||
|
||
plugins { | ||
id("com.android.library") | ||
`maven-publish` | ||
signing | ||
} | ||
|
||
android { | ||
defaultConfig { | ||
libraryVariants.all { | ||
outputs.all { | ||
val output = this as BaseVariantOutputImpl | ||
output.outputFileName = output.outputFileName | ||
.replace(".aar", "-${versionInfo().fullArtifactName}.aar") | ||
} | ||
} | ||
} | ||
publishing { | ||
singleVariant("release") { | ||
withSourcesJar() | ||
withJavadocJar() | ||
} | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
publishing { | ||
publications { | ||
val versionInfo = versionInfo() | ||
create<MavenPublication>("release") { | ||
from(components["release"]) | ||
groupId = "io.github.salute-developers" | ||
artifactId = findPropertyOrDefault("nexus.artifactId", "").toString() | ||
version = versionInfo.fullName | ||
val siteUrl = findPropertyOrDefault("nexus.websiteUrl", "").toString() | ||
val gitUrl = findPropertyOrDefault("nexus.gitUrl", "").toString() | ||
|
||
signing { | ||
useInMemoryPgpKeys( | ||
System.getenv("OSS_SIGNING_KEY_ID"), | ||
System.getenv("OSS_SIGNING_KEY"), | ||
System.getenv("OSS_SIGNING_PASSWORD"), | ||
) | ||
sign(publishing.publications["release"]) | ||
} | ||
|
||
pom { | ||
name.set(artifactId) | ||
description.set(findPropertyOrDefault("nexus.description", "").toString()) | ||
url.set(siteUrl) | ||
scm { | ||
connection.set(gitUrl) | ||
developerConnection.set(gitUrl) | ||
url.set(siteUrl) | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
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,3 @@ | ||
### Playground | ||
|
||
Приложения и библиотеки для удобства разработки и тестирования SDDS Core. |
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,29 @@ | ||
@file:Suppress("DSL_SCOPE_VIOLATION") | ||
plugins { | ||
id("convention.root-project") | ||
alias(libs.plugins.android.app) apply false | ||
alias(libs.plugins.android.lib) apply false | ||
alias(libs.plugins.kotlin.android) apply false | ||
alias(libs.plugins.kotlin.jvm) apply false | ||
alias(libs.plugins.android.cache.fix) apply false | ||
alias(libs.plugins.paparazzi) apply false | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
maven { | ||
url = uri("https://plugins.gradle.org/m2/") | ||
} | ||
} | ||
|
||
dependencies { | ||
classpath(libs.base.gradle.android) | ||
classpath(libs.base.gradle.kotlin) | ||
classpath(libs.base.gradle.detekt) | ||
classpath(libs.base.gradle.spotless) | ||
classpath(libs.base.gradle.paparazzi) | ||
classpath(libs.base.gradle.cacheFix) | ||
} | ||
} |
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,23 @@ | ||
# Project-wide Gradle settings. | ||
# IDE (e.g. Android Studio) users: | ||
# Gradle settings configured through the IDE *will override* | ||
# any settings specified in this file. | ||
# For more details on how to configure your build environment visit | ||
# http://www.gradle.org/docs/current/userguide/build_environment.html | ||
# Specifies the JVM arguments used for the daemon process. | ||
# The setting is particularly useful for tweaking memory settings. | ||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 | ||
# When configured, Gradle will run in incubating parallel mode. | ||
# This option should only be used with decoupled projects. More details, visit | ||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||
# org.gradle.parallel=true | ||
# AndroidX package structure to make it clearer which packages are bundled with the | ||
# Android operating system, and which are packaged with your app's APK | ||
# https://developer.android.com/topic/libraries/support-library/androidx-rn | ||
android.useAndroidX=true | ||
# Kotlin code style for this project: "official" or "obsolete": | ||
kotlin.code.style=official | ||
# Enables namespacing of each library's R class so that its R class includes only the | ||
# resources declared in the library itself and none from the library's dependencies, | ||
# thereby reducing the size of the R class for that library | ||
android.nonTransitiveRClass=true |
Binary file not shown.
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,6 @@ | ||
#Mon Mar 04 17:09:42 MSK 2024 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.