Skip to content

Commit 09a2fd5

Browse files
committed
Update publishing scripts
1 parent cc8844a commit 09a2fd5

File tree

4 files changed

+87
-25
lines changed

4 files changed

+87
-25
lines changed

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ buildscript {
2727
dependencies {
2828
classpath "com.android.tools.build:gradle:7.4.2"
2929
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
30-
classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
3130
classpath "com.gladed.androidgitversion:gradle-android-git-version:0.4.14"
3231
}
3332
}

jitpack-android.gradle

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/*
2+
* Copyright 2021 HyperDevs
3+
*
4+
* Copyright 2020 BQ
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
19+
apply plugin: "maven-publish"
20+
21+
group = "com.hyperdevs"
22+
version = androidGitVersion.name()
23+
24+
android {
25+
publishing {
26+
singleVariant("release") {
27+
withSourcesJar()
28+
withJavadocJar()
29+
}
30+
}
31+
}
32+
33+
afterEvaluate {
34+
publishing {
35+
publications {
36+
// Creates a Maven publication called "release".
37+
release(MavenPublication) {
38+
from components.release
39+
artifactId = "appupdateshelper"
40+
41+
pom {
42+
name = "Android App Updates Helper"
43+
description = "This utility library aims to help Android developers to use the Google Play In-App Updates API in an easy way."
44+
url = "https://github.com/hyperdevs-team/android-app-updates-helper"
45+
version = androidGitVersion.name()
46+
inceptionYear = "2019"
47+
48+
licenses {
49+
license {
50+
name = "The Apache License, Version 2.0"
51+
url = "http://www.apache.org/licenses/LICENSE-2.0.txt"
52+
}
53+
}
54+
55+
organization {
56+
name = "HyperDevs"
57+
url = "https://github.com/hyperdevs-team"
58+
}
59+
60+
issueManagement {
61+
system = "GitHub Issues"
62+
url = "https://github.com/hyperdevs-team/android-app-updates-helper/issues"
63+
}
64+
65+
scm {
66+
connection = "git@github.com:hyperdevs-team/android-app-updates-helper.git"
67+
url = "https://github.com/hyperdevs-team/android-app-updates-helper.git"
68+
}
69+
70+
developers {
71+
developer {
72+
name = "Adrián García"
73+
id = "adriangl"
74+
url = "https://github.com/adriangl"
75+
roles = ["Maintainer"]
76+
}
77+
}
78+
}
79+
}
80+
}
81+
}
82+
}

jitpack.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
jdk:
2+
- openjdk11

lib/build.gradle

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ ext {
3838
}
3939

4040
android {
41-
compileSdkVersion compile_sdk_version
41+
namespace = "com.hyperdevs.appupdateshelper"
42+
compileSdk = compile_sdk_version
4243
buildToolsVersion = build_tools_version
4344

4445
defaultConfig {
@@ -78,27 +79,5 @@ dependencies {
7879
androidTestImplementation "androidx.test.espresso:espresso-core:3.5.1"
7980
}
8081

81-
// Build a jar with source files
82-
task sourcesJar(type: Jar) {
83-
from android.sourceSets.main.java.srcDirs
84-
archiveClassifier.set("sources")
85-
}
86-
87-
// Build JavaDoc from source files
88-
task javadoc(type: Javadoc) {
89-
failOnError false
90-
source = android.sourceSets.main.java.sourceFiles
91-
configurations.implementation.setCanBeResolved(true)
92-
classpath += project.files(android.getBootClasspath().join(File.pathSeparator)) + configurations.implementation
93-
}
82+
apply from: "../jitpack-android.gradle"
9483

95-
// Build a jar with JavaDoc
96-
task javadocJar(type: Jar, dependsOn: javadoc) {
97-
archiveClassifier.set("javadoc")
98-
from javadoc.destinationDir
99-
}
100-
101-
artifacts {
102-
archives sourcesJar
103-
archives javadocJar
104-
}

0 commit comments

Comments
 (0)