Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
39 lines (36 loc) · 1.54 KB
/
Copy pathbuild.gradle
File metadata and controls
39 lines (36 loc) · 1.54 KB
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.11.1'
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("sonatypeUsername", System.getenv('SONATYPE_USERNAME'))
password = properties.getProperty("sonatypePassword", System.getenv('SONATYPE_PASSWORD'))
nexusUrl.set(uri("https://ossrh-staging-api.central.sonatype.com/service/local/"))
snapshotRepositoryUrl.set(uri("https://central.sonatype.com/repository/maven-snapshots/"))
}
}
}