forked from DanielMartinus/Konfetti
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
36 lines (34 loc) · 1.3 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
plugins {
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
id("org.jetbrains.dokka") version "1.7.0"
}
buildscript {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.0.2")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${Constants.kotlinVersion}")
classpath("com.github.dcendents:android-maven-gradle-plugin:2.1")
classpath("com.diffplug.spotless:spotless-plugin-gradle:6.23.3")
classpath("io.github.gradle-nexus:publish-plugin:1.3.0")
classpath("org.jetbrains.dokka:dokka-gradle-plugin:1.7.0")
}
}
// Connect with the repository using properties from local.properties in the root of the project
val properties = File(rootDir, "local.properties")
if(properties.exists()) {
val localProperties = properties.inputStream().use { java.util.Properties().apply { load(it) } }
// Set up Sonatype repository
nexusPublishing {
repositories {
sonatype {
stagingProfileId.set(localProperties["sonatypeStagingProfileId"] as String?)
username.set(localProperties["ossrhUsername"] as String?)
password.set(localProperties["ossrhPassword"] as String?)
}
}
}
}