Skip to content

Commit df7b530

Browse files
author
mahdi
committed
add maven publish ***
1 parent db1e32b commit df7b530

File tree

3 files changed

+47
-10
lines changed

3 files changed

+47
-10
lines changed

FilePicker/build.gradle

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
buildscript {
2+
ext.kotlin_version = '1.7.10'
3+
repositories {
4+
google()
5+
mavenCentral()
6+
mavenLocal()
7+
}
8+
9+
dependencies {
10+
classpath 'com.android.tools.build:gradle:7.1.3'
11+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
12+
}
13+
}
14+
115
plugins {
216
id 'com.android.library'
317
id 'org.jetbrains.kotlin.android'
@@ -48,6 +62,19 @@ android {
4862

4963
}
5064

65+
//===============================
66+
java {
67+
toolchain {
68+
languageVersion = JavaLanguageVersion.of(17) // << --- ADD This
69+
}
70+
}
71+
72+
73+
java {
74+
sourceCompatibility = JavaVersion.VERSION_17 // << --- ADD This
75+
targetCompatibility = JavaVersion.VERSION_17
76+
}
77+
5178
dependencies {
5279

5380
implementation 'androidx.core:core-ktx:1.8.0'
@@ -63,17 +90,18 @@ dependencies {
6390
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
6491
}
6592

66-
6793
publishing {
6894
publications {
69-
release(MavenPublication) {
70-
groupId = "com.mahdiasd.filepicker"
71-
artifactId = "FilePicker"
72-
version = "2.3.0"
73-
74-
afterEvaluate {
75-
from components.release
95+
maven(MavenPublication) {
96+
groupId = 'com.mahdiasd.filepicker'
97+
artifactId = 'filepicker'
98+
version = "2.3.2"
99+
pom {
100+
description = 'First release'
76101
}
77102
}
78103
}
79-
}
104+
repositories {
105+
mavenLocal()
106+
}
107+
}

pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>com.mahdiasd.filepicker</groupId>
6+
<artifactId>filepicker</artifactId>
7+
<version>1.0</version>
8+
<packaging>pom</packaging>
9+
<description>First version release</description>
10+
</project>

settings.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ dependencyResolutionManagement {
1111
google()
1212
mavenCentral()
1313
maven { url = "https://jitpack.io" }
14-
1514
}
1615
}
1716
rootProject.name = "Sample"

0 commit comments

Comments
 (0)