1- apply plugin : ' com.android.library '
2- apply plugin : ' kotlin- android'
3- apply plugin : ' kotlin-android-extensions '
4- apply plugin : ' kotlin-kapt '
5- apply plugin : ' maven '
6-
7- def deployTo = new File (rootDir, " repository " )
1+ plugins {
2+ id ' com. android.library '
3+ id ' kotlin-android'
4+ id ' kotlin-android-extensions '
5+ id ' kotlin-kapt '
6+ id ' maven-publish '
7+ }
88
99android {
10- compileSdkVersion 29
10+ compileSdkVersion 30
1111 buildToolsVersion " 29.0.3"
12- ndkVersion " 21.3.6528147 "
12+ ndkVersion " 21.4.7075529 "
1313
1414 defaultConfig {
1515 minSdkVersion 16
16- targetSdkVersion 29
16+ targetSdkVersion 30
1717 versionCode 1
1818 versionName " 1.0"
1919
@@ -26,6 +26,26 @@ android {
2626 }
2727 }
2828
29+ flavorDimensions " depth"
30+ productFlavors {
31+ full {
32+ dimension " depth"
33+ externalNativeBuild {
34+ cmake {
35+ arguments + = ' -DFLAVOR_DEPTH=full'
36+ }
37+ }
38+ }
39+ only8bpc {
40+ dimension " depth"
41+ externalNativeBuild {
42+ cmake {
43+ arguments + = ' -DFLAVOR_DEPTH=only8bpc'
44+ }
45+ }
46+ }
47+ }
48+
2949 buildTypes {
3050 release {
3151 minifyEnabled false
@@ -62,13 +82,28 @@ dependencies {
6282 kapt ' com.github.bumptech.glide:compiler:4.11.0'
6383}
6484
65- uploadArchives {
66- repositories {
67- mavenDeployer {
68- repository url : " file://${ deployTo} "
69- pom. version = ' 0.8.0'
70- pom. groupId = ' jp.co.link_u.library.glideavif'
71- pom. artifactId = ' glideavif'
85+ def mavenVersion = ' 0.8.0'
86+
87+ afterEvaluate {
88+ publishing {
89+ publications {
90+ fullRelease(MavenPublication ) {
91+ groupId = ' jp.co.link_u.library.glideavif'
92+ artifactId = ' glideavif'
93+ version = mavenVersion
94+ from components. fullRelease
95+ }
96+ only8bpcRelease(MavenPublication ) {
97+ groupId = ' jp.co.link_u.library.glideavif'
98+ artifactId = ' glideavif-8bpc'
99+ version = mavenVersion
100+ from components. only8bpcRelease
101+ }
102+ }
103+ repositories {
104+ maven {
105+ url = uri(" $rootDir /repository" )
106+ }
72107 }
73108 }
74- }
109+ }
0 commit comments