forked from youth5201314/banner
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
原流程導致 jitpack 包版失敗,移除 mavencentral 的上傳庫倉邏輯,
- Loading branch information
1 parent
ee0fa84
commit fde29b6
Showing
1 changed file
with
0 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
apply plugin: 'com.android.library' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
version = '2.2.2' | ||
|
||
|
@@ -35,65 +33,3 @@ task androidSourcesJar(type: Jar) { | |
exclude "**/R.class" | ||
exclude "**/BuildConfig.class" | ||
} | ||
|
||
publishing { | ||
publications { | ||
release(MavenPublication) { | ||
// group id,发布后引用的依赖的 group id | ||
groupId 'io.github.youth5201314' | ||
// 发布后引用的依赖的 artifact id | ||
artifactId 'banner' | ||
// 发布的版本 | ||
version version | ||
// 发布的 arr 的文件和源码文件 | ||
artifact("$buildDir/outputs/aar/${project.getName()}-release.aar") | ||
artifact androidSourcesJar | ||
pom { | ||
// 构件名称,可以自定义 | ||
name = 'banner' | ||
// 构件描述 | ||
description = 'Android Banner 2.0 全新轮播控件,采用viewpager2为基础控件,支持AndroidX' | ||
// 构件主页 | ||
url = 'https://github.com/youth5201314/banner' | ||
// 许可证名称和地址 | ||
licenses { | ||
license { | ||
name = 'The Apache License, Version 2.0' | ||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
} | ||
} | ||
// 开发者信息 | ||
developers { | ||
developer { | ||
name = '王兴春' | ||
email = '[email protected]' | ||
} | ||
} | ||
// 版本控制仓库地址 | ||
scm { | ||
url = 'https://github.com/youth5201314/banner' | ||
connection = 'scm:git:github.com/youth5201314/banner.git' | ||
developerConnection = 'scm:git:ssh://[email protected]/youth5201314/banner.git' | ||
} | ||
} | ||
} | ||
} | ||
repositories { | ||
maven { | ||
// 发布的位置,这里根据发布的版本区分了 SNAPSHOT 和最终版本两种情况 | ||
def releasesRepoUrl = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/" | ||
def snapshotsRepoUrl = "https://s01.oss.sonatype.org/content/repositories/snapshots/" | ||
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl | ||
credentials { | ||
// 这里就是之前在 issues.sonatype.org 注册的账号 | ||
username sonatypeUsername | ||
password sonatypePassword | ||
} | ||
} | ||
} | ||
} | ||
|
||
signing { | ||
sign publishing.publications | ||
} | ||
|