165 lines
4.7 KiB
Groovy
165 lines
4.7 KiB
Groovy
import com.android.builder.model.ApiVersion
|
|
import com.android.builder.model.ProductFlavor
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenCentral()
|
|
google()
|
|
maven {
|
|
url = "https://maven.aliyun.com/nexus/content/repositories/releases/"
|
|
}
|
|
maven {
|
|
url = "https://maven.aliyun.com/nexus/content/repositories/snapshots"
|
|
}
|
|
}
|
|
dependencies {
|
|
classpath 'com.android.tools.build:gradle:8.2.0'
|
|
}
|
|
}
|
|
|
|
apply plugin: 'com.android.library'
|
|
apply plugin: 'maven-publish'
|
|
apply plugin: 'signing'
|
|
|
|
allprojects {
|
|
repositories {
|
|
mavenCentral()
|
|
google()
|
|
maven {
|
|
url = "https://maven.aliyun.com/nexus/content/repositories/releases/"
|
|
}
|
|
maven {
|
|
url = "https://maven.aliyun.com/nexus/content/repositories/snapshots"
|
|
}
|
|
}
|
|
}
|
|
|
|
configurations {
|
|
javadocDeps {
|
|
extendsFrom implementation
|
|
canBeResolved = true
|
|
canBeConsumed = false
|
|
}
|
|
}
|
|
|
|
tasks.register('androidJavadocs', Javadoc) {
|
|
source = android.sourceSets.main.java.srcDirs
|
|
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
|
|
classpath += configurations.javadocDeps
|
|
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
|
options.addStringOption('encoding', 'UTF-8')
|
|
}
|
|
|
|
tasks.register('androidJavadocsJar', Jar) {
|
|
dependsOn androidJavadocs
|
|
archiveClassifier.set('javadoc')
|
|
from androidJavadocs.destinationDir
|
|
}
|
|
|
|
tasks.register('androidSourcesJar', Jar) {
|
|
archiveClassifier.set('sources')
|
|
from android.sourceSets.main.java.srcDirs
|
|
}
|
|
|
|
android {
|
|
namespace = "net.irext.webapi"
|
|
signingConfigs {
|
|
irext_key {
|
|
keyAlias 'irext-android'
|
|
keyPassword 'ghostcicy'
|
|
storeFile file('/home/strawmanbobi/Develop/project/irext/keys/irext-android.jks')
|
|
storePassword 'ghostcicy'
|
|
}
|
|
}
|
|
compileSdk = 36
|
|
defaultConfig {
|
|
minSdkVersion = 26
|
|
targetSdkVersion = 36
|
|
versionCode = 7
|
|
versionName = '1.5.2'
|
|
signingConfig = signingConfigs.irext_key
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
versionNameSuffix '1.5.2'
|
|
}
|
|
debug {
|
|
debuggable true
|
|
minifyEnabled false
|
|
jniDebuggable true
|
|
}
|
|
}
|
|
productFlavors {
|
|
}
|
|
|
|
publishing {
|
|
singleVariant('release') {
|
|
}
|
|
}
|
|
}
|
|
|
|
afterEvaluate {
|
|
publishing {
|
|
publications {
|
|
release(MavenPublication) {
|
|
groupId = android.namespace
|
|
artifactId = 'irext-androidapi'
|
|
version = android.defaultConfig.versionName
|
|
|
|
from components.release
|
|
|
|
artifact androidSourcesJar
|
|
artifact androidJavadocsJar
|
|
|
|
pom {
|
|
name = 'irext-remote-index-android'
|
|
description = 'Android Indexing API for IRext remote controller'
|
|
url = 'https://opensource.irext.net/irext/index-api'
|
|
|
|
licenses {
|
|
license {
|
|
name = 'MIT'
|
|
url = 'https://opensource.irext.net/irext/index-api/-/blob/master/LICENSE'
|
|
}
|
|
}
|
|
developers {
|
|
developer {
|
|
name = 'Strawmanbobi'
|
|
email = 'strawmanbobi@irext.net'
|
|
organizationUrl = 'https://site.irext.net'
|
|
}
|
|
}
|
|
scm {
|
|
connection = 'scm:git:git://opensource.irext.net/irext/index-api'
|
|
developerConnection = 'scm:git:ssh://opensource.irext.net/irext/index-api'
|
|
url = 'https://opensource.irext.net/irext/index-api'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
name = "OSSRH"
|
|
url = uri('https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/')
|
|
credentials {
|
|
username = project.hasProperty('mavenCentralUsername') ? project.mavenCentralUsername : ''
|
|
password = project.hasProperty('mavenCentralPassword') ? project.mavenCentralPassword : ''
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
signing {
|
|
sign publishing.publications.release
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation 'com.squareup.okhttp3:okhttp:5.3.1'
|
|
implementation 'com.squareup.okio:okio:3.16.3'
|
|
implementation 'com.google.code.gson:gson:2.13.2'
|
|
} |