Skip to content

Commit c796091

Browse files
add maven-publish plugin
1 parent 1fd7bb4 commit c796091

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

.idea/gradle.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ buildscript {
33
repositories {
44
google()
55
mavenCentral()
6+
maven { url 'https://jitpack.io' }
67
}
78
dependencies {
89
classpath "com.android.tools.build:gradle:7.0.3"
10+
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
911

1012
// NOTE: Do not place your application dependencies here; they belong
1113
// in the individual module build.gradle files

scratchview/build.gradle

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
plugins {
22
id 'com.android.library'
3+
id 'maven-publish'
34
}
45

56
android {
@@ -28,10 +29,22 @@ android {
2829
}
2930

3031
dependencies {
31-
3232
implementation 'androidx.appcompat:appcompat:1.3.1'
3333
implementation 'com.google.android.material:material:1.4.0'
3434
testImplementation 'junit:junit:4.13.2'
3535
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
3636
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
37+
}
38+
39+
afterEvaluate {
40+
publishing {
41+
publications {
42+
release(MavenPublication) {
43+
from components.release
44+
groupId = "com.anupkumarpanwar"
45+
artifactId = "scratchviewdemo"
46+
version = '1.6'
47+
}
48+
}
49+
}
3750
}

0 commit comments

Comments
 (0)