lmw
2023-05-12 3408b10a3466f2db3f81e5c484142e3c180d36ac
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
plugins {
    id "com.jfrog.bintray" version "1.7.3"
    id "com.github.dcendents.android-maven" version "1.5"
}
 
apply plugin: 'com.android.library'
 
//upload settings to bintray
ext {
    bintrayRepo = 'widget'
    bintrayName = 'ChipsLayoutManager'
 
    libraryName = 'ChipsLayoutManager'
    publishedGroupId = 'com.beloo.widget'
    artifact = 'ChipsLayoutManager'
    libraryVersion = "rootProject.ext.libraryVersion"
 
    libraryDescription = 'Android. A custom layout manager for RecyclerView which mimicric TextView span behaviour, flow layouts behaviour with support of amazing recyclerView features'
 
    siteUrl = 'https://github.com/BelooS/ChipsLayoutManager'
    gitUrl = 'https://github.com/BelooS/ChipsLayoutManager.git'
 
    developerId = 'beloo'
    developerName = 'Beloy Oleg'
    developerEmail = 'beloyoleg@gmail.com'
 
    licenseName = 'The Apache Software License, Version 2.0'
    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
    allLicenses = ["Apache-2.0"]
}
 
android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"
 
    testBuildType "debug"
 
    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 10
        versionName "1.0.1"
 
        testApplicationId "com.beloo.chipslayoutmanager.test"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
 
    }
    buildTypes {
 
        all {
            buildConfigField("boolean", "isLogEnabled", "false")
        }
 
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
 
        development {
            buildConfigField("boolean", "isLogEnabled", "true")
        }
    }
 
    sourceSets {
        androidTest {
            res.srcDirs = ['src/androidTest/res']
        }
    }
 
}
 
task androidJavadocs(type: Javadoc) {
    source = android.sourceSets.main.java.srcDirs
}
 
task androidJavadocsJar(type: Jar) {
    classifier = 'javadoc'
    baseName = artifact
    from androidJavadocs.destinationDir
}
 
task androidSourcesJar(type: Jar) {
    classifier = 'sources'
    baseName = artifact
    from android.sourceSets.main.java.srcDirs
}
 
artifacts {
    archives androidSourcesJar
    archives androidJavadocsJar
}
 
 
def supportVersion = "25+";
 
dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
 
    compile "com.android.support:appcompat-v7:$supportVersion"
    compile "com.android.support:recyclerview-v7:$supportVersion"
 
    androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
    androidTestCompile 'com.android.support.test:runner:0.5'
    androidTestCompile "com.android.support:support-annotations:$supportVersion"
    androidTestCompile 'pl.pragmatists:JUnitParams:1.0.5'
}
 
group = publishedGroupId // Maven Group ID for the artifact
version = libraryVersion
 
install {
    repositories.mavenInstaller {
        // This generates POM.xml with proper parameters
        pom {
            project {
                packaging 'aar'
                groupId publishedGroupId
                artifactId artifact
                version libraryVersion
 
                // Add your description here
                name libraryName
                description libraryDescription
                url siteUrl
 
                // Set your license
                licenses {
                    license {
                        name licenseName
                        url licenseUrl
                    }
                }
                developers {
                    developer {
                        id developerId
                        name developerName
                        email developerEmail
                    }
                }
                scm {
                    connection gitUrl
                    developerConnection gitUrl
                    url siteUrl
 
                }
            }.writeTo("$buildDir/poms/pom-default.xml")
        }
    }
}
 
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
 
bintray {
    user = properties.getProperty("bintray.user")
    key = properties.getProperty("bintray.apikey")
 
    configurations = ['archives'] //When uploading configuration files
 
    dryRun = false //[Default: false] Whether to run this as dry-run, without deploying
    publish = true //[Default: false] Whether version should be auto published after an upload
    override = true //[Default: false] Whether to override version artifacts already published
 
    //Package configuration. The plugin will use the repo and name properties to check if the package already exists. In that case, there's no need to configure the other package properties (like userOrg, desc, etc).
    pkg {
        repo = bintrayRepo
        name = bintrayName
        desc = libraryDescription
        websiteUrl = siteUrl
        issueTrackerUrl = 'https://github.com/BelooS/ChipsLayoutManager/issues'
        vcsUrl = gitUrl
        licenses = allLicenses
        publish = true
        publicDownloadNumbers = true
 
        githubRepo = 'BelooS/ChipsLayoutManager'
        githubReleaseNotesFile = 'README.md'
 
        //Optional version descriptor
        version {
            name = libraryVersion //Bintray logical version name
            desc = '' //Optional - Version-specific description'
            vcsTag = libraryVersion
 
            gpg {
                sign = true //Determines whether to GPG sign the files. The default is false
                passphrase = properties.getProperty("bintray.gpg.password")
                //Optional. The passphrase for GPG signing'
            }
        }
    }
}