-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
39 lines (36 loc) · 1.51 KB
/
build.gradle
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
37
38
39
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'com.android.tools.build:gradle:8.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20"
classpath 'io.github.gradle-nexus:publish-plugin:2.0.0'
classpath 'de.undercouch:gradle-download-task:5.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle.kts files
}
}
apply plugin: 'io.github.gradle-nexus.publish-plugin'
tasks.register('clean', Delete) {
delete rootProject.buildDir
}
Properties properties = new Properties()
if (rootProject.file("local.properties").exists()) {
properties.load(rootProject.file("local.properties").newDataInputStream())
}
// Publish to Maven Central
nexusPublishing {
repositories {
sonatype {
stagingProfileId = properties.getProperty("sonatypeStagingProfileId", System.getenv('SONATYPE_STAGING_PROFILE_ID'))
username = properties.getProperty("ossrhUsername", System.getenv('OSSRH_USERNAME'))
password = properties.getProperty("ossrhPassword", System.getenv('OSSRH_PASSWORD'))
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
}
}