mirror of
https://github.com/kiwix/java-libkiwix.git
synced 2025-08-03 11:06:15 -04:00

* Upgraded the gradle to support the Android 14. * Made the changes in code to adapt the new gradle. * Rectify the deprecated code that are not working in new version of gradle.
40 lines
1.5 KiB
Groovy
40 lines
1.5 KiB
Groovy
// 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.0-alpha10"
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.20"
|
|
classpath 'io.github.gradle-nexus:publish-plugin:1.1.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/"))
|
|
}
|
|
}
|
|
}
|