This repository was archived by the owner on Apr 19, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +49
-15
lines changed
Expand file tree Collapse file tree 3 files changed +49
-15
lines changed Original file line number Diff line number Diff line change 11apply plugin : ' com.android.library'
22apply plugin : ' kotlin-android'
3+ apply from : file(' publish.gradle' )
34
45android {
56 compileSdkVersion 30
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ apply plugin : ' maven-publish'
2+
3+ def LIB_GROUP_ID = ' me.jackdevey.libraries'
4+ def LIB_ARTIFACT_ID = ' codeview'
5+ def LIB_VERSION = ' 1.0.0'
6+
7+ task sourceJar (type : Jar ) {
8+ from android. sourceSets. main. java. srcDirs
9+ classifier " sources"
10+ }
11+
12+ publishing {
13+ repositories {
14+ maven {
15+ name = " GithubPackages"
16+ url = uri(" https://maven.pkg.github.com/chenzhang2006/AndroidLibForArtifactory" )
17+ credentials {
18+ username = System . getenv(' GITHUB_USER' ) ?: project. properties[' GITHUB_USER' ]
19+ password = System . getenv(' GITHUB_PERSONAL_ACCESS_TOKEN' ) ?: project. properties[' GITHUB_PERSONAL_ACCESS_TOKEN' ]
20+ }
21+ }
22+ maven {
23+ name = ' CustomMavenRepo'
24+ url = " file://${ buildDir} /repo"
25+ }
26+ }
27+ publications {
28+ codeview(MavenPublication ) {
29+ groupId LIB_GROUP_ID
30+ artifactId LIB_ARTIFACT_ID
31+ version LIB_VERSION
32+ artifact(" $buildDir /outputs/aar/codeview-release.aar" )
33+ artifact(sourceJar)
34+
35+ pom. withXml {
36+ def dependenciesNode = asNode(). appendNode(' dependencies' )
37+
38+ // Iterate over the compile dependencies (we don't want the test ones), adding a <dependency> node for each
39+ configurations. api. allDependencies. each {
40+ def dependencyNode = dependenciesNode. appendNode(' dependency' )
41+ dependencyNode. appendNode(' groupId' , it. group)
42+ dependencyNode. appendNode(' artifactId' , it. name)
43+ dependencyNode. appendNode(' version' , it. version)
44+ }
45+ }
46+ }
47+ }
48+ }
You can’t perform that action at this time.
0 commit comments