fluentui-android/fluentui_drawer/build.gradle

115 строки
4.2 KiB
Groovy

/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'maven-publish'
apply plugin: 'com.jfrog.bintray'
apply from: '../config.gradle'
android {
compileSdkVersion constants.compileSdkVersion
buildFeatures {
viewBinding true
}
defaultConfig {
minSdkVersion constants.minSdkVersion
targetSdkVersion constants.targetSdkVersion
versionCode project.ext.fluentui_drawer_version_code
versionName project.ext.fluentui_drawer_versionid
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
consumerProguardFiles 'consumer-rules.pro'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':fluentui_core')
implementation project(':fluentui_listitem')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.appcompat:appcompat:$appCompatVersion"
implementation "androidx.recyclerview:recyclerview:$recyclerViewVersion"
implementation "com.google.android.material:material:$materialVersion"
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$extJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
}
task sourceJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier "sources"
}
project.afterEvaluate {
publishing {
repositories {
maven {
url 'https://pkgs.dev.azure.com/microsoftdesign/fluentui-native/_packaging/fluentui-android/maven/v1'
credentials {
username = project.hasProperty("mavenUserName") ? "$mavenUserName" : ""
password = project.hasProperty("mavenPassword") ? "$mavenPassword" : ""
}
}
}
publications {
FluentUI(MavenPublication) {
groupId 'com.microsoft.fluentui'
artifactId "fluentui_drawer"
version = android.defaultConfig.versionName
artifact(sourceJar)
artifact(bundleReleaseAar)
pom.withXml {
def dependenciesNode = asNode().appendNode('dependencies')
// Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
configurations.implementation.allDependencies.each {
if (it.group != null && (it.name != null && it.name != "unspecified") && it.version != null) {
def dependencyNode = dependenciesNode.appendNode('dependency')
if (it instanceof ProjectDependency) {
dependencyNode.appendNode('groupId', 'com.microsoft.fluentui')
dependencyNode.appendNode('artifactId', it.name)
def artifactName = it.name.replaceAll('-', '_') + '_versionid'
dependencyNode.appendNode('version', getProperty(artifactName).toString())
} else {
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}
}
}
bintray {
user = project.hasProperty('bintrayUser') ? "$bintrayUser" : ""
key = project.hasProperty('bintrayKey') ? "$bintrayKey" : ""
publications = ['FluentUI']
publish = true
override = true
pkg {
repo = 'generic'
name = 'fluentui_drawer'
version {
name = android.defaultConfig.versionName
vcsTag = android.defaultConfig.versionName
}
}
}