Compare commits
4 Commits
v0.119.0-b
...
winboll
| Author | SHA1 | Date | |
|---|---|---|---|
| adc32e25e1 | |||
| e2e94e938e | |||
| a0c2d12eeb | |||
| 11a5cc020e |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -37,3 +37,9 @@ local.properties
|
|||||||
.swp
|
.swp
|
||||||
ehthumbs.db
|
ehthumbs.db
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
|
## WinBoLL Studio Configs
|
||||||
|
winboll.properties
|
||||||
|
appkey.jks
|
||||||
|
appkey.keystore
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,13 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id "com.android.application"
|
id "com.android.application"
|
||||||
}
|
}
|
||||||
|
// 读取秘钥配置文件
|
||||||
|
//
|
||||||
|
def keyProps = new Properties()
|
||||||
|
def keyPropsFile = rootProject.file('appkey.keystore')
|
||||||
|
if (keyPropsFile.exists()) {
|
||||||
|
keyProps.load(new FileInputStream(keyPropsFile))
|
||||||
|
}
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
// The packageVariant defines the bootstrap variant that will be included in the app APK.
|
// The packageVariant defines the bootstrap variant that will be included in the app APK.
|
||||||
@@ -75,24 +82,37 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 配置签名
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
|
winboll {
|
||||||
|
keyAlias keyProps['keyAlias']
|
||||||
|
keyPassword keyProps['keyPassword']
|
||||||
|
storeFile keyProps['storeFile'] ? file(keyProps['storeFile']) : null
|
||||||
|
storePassword keyProps['storePassword']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*signingConfigs {
|
||||||
debug {
|
debug {
|
||||||
storeFile file('testkey_untrusted.jks')
|
storeFile file('testkey_untrusted.jks')
|
||||||
keyAlias 'alias'
|
keyAlias 'alias'
|
||||||
storePassword 'xrj45yWGLbsO7W0v'
|
storePassword 'xrj45yWGLbsO7W0v'
|
||||||
keyPassword 'xrj45yWGLbsO7W0v'
|
keyPassword 'xrj45yWGLbsO7W0v'
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
|
signingConfig signingConfigs.winboll
|
||||||
minifyEnabled true
|
minifyEnabled true
|
||||||
shrinkResources false // Reproducible builds
|
shrinkResources false // Reproducible builds
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
|
|
||||||
debug {
|
debug {
|
||||||
signingConfig signingConfigs.debug
|
signingConfig signingConfigs.winboll
|
||||||
|
//signingConfig signingConfigs.debug
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ buildscript {
|
|||||||
google()
|
google()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath "com.android.tools.build:gradle:4.2.2"
|
//classpath "com.android.tools.build:gradle:4.2.2"
|
||||||
|
classpath "com.android.tools.build:gradle:7.2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,11 @@ android.useAndroidX=true
|
|||||||
|
|
||||||
minSdkVersion=21
|
minSdkVersion=21
|
||||||
targetSdkVersion=28
|
targetSdkVersion=28
|
||||||
ndkVersion=22.1.7171670
|
|
||||||
|
ndkVersion=24.0.8215888
|
||||||
compileSdkVersion=30
|
compileSdkVersion=30
|
||||||
|
|
||||||
markwonVersion=4.6.2
|
markwonVersion=4.6.2
|
||||||
|
|
||||||
|
# 保持与旧版Gradle插件的兼容
|
||||||
|
android.disableAutomaticComponentCreation=true
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
|
apply from: 'localandwinboll-maven-publish.gradle'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion project.properties.compileSdkVersion.toInteger()
|
compileSdkVersion project.properties.compileSdkVersion.toInteger()
|
||||||
@@ -59,17 +60,17 @@ task sourceJar(type: Jar) {
|
|||||||
classifier "sources"
|
classifier "sources"
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
//afterEvaluate {
|
||||||
publishing {
|
// publishing {
|
||||||
publications {
|
// publications {
|
||||||
// Creates a Maven publication called "release".
|
// // Creates a Maven publication called "release".
|
||||||
release(MavenPublication) {
|
// release(MavenPublication) {
|
||||||
from components.release
|
// from components.release
|
||||||
groupId = 'com.termux'
|
// groupId = 'com.termux'
|
||||||
artifactId = 'terminal-emulator'
|
// artifactId = 'terminal-emulator'
|
||||||
version = '0.118.0'
|
// version = '0.118.0'
|
||||||
artifact(sourceJar)
|
// artifact(sourceJar)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
206
terminal-emulator/localandwinboll-maven-publish.gradle
Normal file
206
terminal-emulator/localandwinboll-maven-publish.gradle
Normal file
@@ -0,0 +1,206 @@
|
|||||||
|
// 本机和 WinBoll Maven 仓库传输配置。
|
||||||
|
//
|
||||||
|
|
||||||
|
def siteUrl = 'https://winboll.cc/studio/termux-app' // 项目主页
|
||||||
|
def gitUrl = 'https://gitea.winboll.cc/Studio/termux-app.git' // 项目的git地址
|
||||||
|
def DefaultGroupId = 'com.termux' // 类库GroupId
|
||||||
|
def DefaultArtifactId = 'terminal-emulator' // 类库ArtifactId
|
||||||
|
def DefaultVersion = '0.118.0' // 版本号
|
||||||
|
def DeveloperId='zhangsken' // 开发者账号
|
||||||
|
def DeveloperName='ZhanGSKen' // 开发者名称
|
||||||
|
def DeveloperEMail='ZhanGSKen@QQ.COM' // 开发者邮箱地址
|
||||||
|
def LicenseName='The Apache Software License, Version 2.0'
|
||||||
|
def LicenseUrl='http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||||
|
def WinBollMavneConfigFile='winboll.properties'
|
||||||
|
|
||||||
|
Properties properties = new Properties()
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
publishing {
|
||||||
|
repositories {
|
||||||
|
if(project.rootProject.file(WinBollMavneConfigFile).exists()) {
|
||||||
|
properties.load(project.rootProject.file(WinBollMavneConfigFile).newDataInputStream())
|
||||||
|
def NexusUserName = properties.getProperty("Nexus.name")
|
||||||
|
def NexusPassword = properties.getProperty("Nexus.password")
|
||||||
|
// WinBoll Release 仓库
|
||||||
|
maven{
|
||||||
|
//仓库的名字和地址
|
||||||
|
name = "WinBollRelease"
|
||||||
|
url="https://nexus.winboll.cc/repository/maven-releases/"
|
||||||
|
// 仓库用户名密码
|
||||||
|
credentials {
|
||||||
|
username = NexusUserName
|
||||||
|
password = NexusPassword
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// WinBoll Snapshot 仓库
|
||||||
|
maven{
|
||||||
|
//仓库的名字和地址
|
||||||
|
name = "WinBollSnapshot"
|
||||||
|
url="https://nexus.winboll.cc/repository/maven-snapshots/"
|
||||||
|
// 仓库用户名密码
|
||||||
|
credentials {
|
||||||
|
username = NexusUserName
|
||||||
|
password = NexusPassword
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
publications {
|
||||||
|
// Local Maven 仓库传输任务
|
||||||
|
//
|
||||||
|
release(MavenPublication) {
|
||||||
|
groupId = DefaultGroupId
|
||||||
|
artifactId = DefaultArtifactId
|
||||||
|
version = DefaultVersion
|
||||||
|
|
||||||
|
//from components.java
|
||||||
|
// 必须有这个 否则不会上传AAR包
|
||||||
|
afterEvaluate { artifact(tasks.getByName("bundleReleaseAar")) }
|
||||||
|
// 上传source,这样使用方可以看到方法注释
|
||||||
|
//artifact generateSourcesJar
|
||||||
|
//要上传的aar路径
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-release.aar"
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-debug.aar"
|
||||||
|
|
||||||
|
//对pom进行的操作
|
||||||
|
pom.withXml{
|
||||||
|
Node pomNode = asNode()
|
||||||
|
pomNode.dependencies.'*'.findAll() {
|
||||||
|
//将所有的默认依赖移除
|
||||||
|
//it.parent().remove(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pom {
|
||||||
|
name = artifactId
|
||||||
|
url = siteUrl
|
||||||
|
licenses {
|
||||||
|
license { //证书说明
|
||||||
|
name=LicenseName // 开源协议名称
|
||||||
|
url=LicenseUrl // 协议地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id=DeveloperId // 开发者账号
|
||||||
|
name=DeveloperName // 开发者名称
|
||||||
|
email=DeveloperEMail // 开发者邮箱地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//软件配置管理
|
||||||
|
scm {
|
||||||
|
connection=gitUrl
|
||||||
|
developerConnection=gitUrl
|
||||||
|
url=siteUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WinBoll Maven Release 仓库传输任务
|
||||||
|
//
|
||||||
|
releaseWinBoll(MavenPublication) {
|
||||||
|
// 需要使用的变体,假设有free和pay两个变体,可以选择一个
|
||||||
|
//from components.free
|
||||||
|
|
||||||
|
groupId = DefaultGroupId // 文件的groupId
|
||||||
|
artifactId = DefaultArtifactId //文件的名字
|
||||||
|
version = DefaultVersion //版本号
|
||||||
|
|
||||||
|
//from components.java
|
||||||
|
// 必须有这个 否则不会上传AAR包
|
||||||
|
afterEvaluate { artifact(tasks.getByName("bundleReleaseAar")) }
|
||||||
|
// 上传source,这样使用方可以看到方法注释
|
||||||
|
//artifact generateSourcesJar
|
||||||
|
//要上传的aar路径
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-release.aar"
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-debug.aar"
|
||||||
|
|
||||||
|
//对pom进行的操作
|
||||||
|
pom.withXml{
|
||||||
|
Node pomNode = asNode()
|
||||||
|
pomNode.dependencies.'*'.findAll() {
|
||||||
|
//将所有的默认依赖移除
|
||||||
|
//it.parent().remove(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pom {
|
||||||
|
name = artifactId
|
||||||
|
url = siteUrl
|
||||||
|
licenses {
|
||||||
|
license { //证书说明
|
||||||
|
name=LicenseName // 开源协议名称
|
||||||
|
url=LicenseUrl // 协议地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id=DeveloperId // 开发者账号
|
||||||
|
name=DeveloperName // 开发者名称
|
||||||
|
email=DeveloperEMail // 开发者邮箱地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//软件配置管理
|
||||||
|
scm {
|
||||||
|
connection=gitUrl
|
||||||
|
developerConnection=gitUrl
|
||||||
|
url=siteUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // 创建名为 release 的任务结束
|
||||||
|
|
||||||
|
// WinBoll Maven Snapshot 仓库传输任务
|
||||||
|
//
|
||||||
|
snapshotWinBoll(MavenPublication) {
|
||||||
|
// 需要使用的变体,假设有free和pay两个变体,可以选择一个
|
||||||
|
//from components.free
|
||||||
|
|
||||||
|
groupId = DefaultGroupId // 文件的groupId
|
||||||
|
artifactId = DefaultArtifactId //文件的名字
|
||||||
|
version = DefaultVersion + "-SNAPSHOT" //版本号
|
||||||
|
|
||||||
|
//from components.java
|
||||||
|
// 必须有这个 否则不会上传AAR包
|
||||||
|
afterEvaluate { artifact(tasks.getByName("bundleReleaseAar")) }
|
||||||
|
// 上传source,这样使用方可以看到方法注释
|
||||||
|
//artifact generateSourcesJar
|
||||||
|
//要上传的aar路径
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-release.aar"
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-debug.aar"
|
||||||
|
|
||||||
|
//对pom进行的操作
|
||||||
|
pom.withXml{
|
||||||
|
Node pomNode = asNode()
|
||||||
|
pomNode.dependencies.'*'.findAll() {
|
||||||
|
//将所有的默认依赖移除
|
||||||
|
//it.parent().remove(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pom {
|
||||||
|
name = artifactId
|
||||||
|
url = siteUrl
|
||||||
|
licenses {
|
||||||
|
license { //证书说明
|
||||||
|
name=LicenseName // 开源协议名称
|
||||||
|
url=LicenseUrl // 协议地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id=DeveloperId // 开发者账号
|
||||||
|
name=DeveloperName // 开发者名称
|
||||||
|
email=DeveloperEMail // 开发者邮箱地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//软件配置管理
|
||||||
|
scm {
|
||||||
|
connection=gitUrl
|
||||||
|
developerConnection=gitUrl
|
||||||
|
url=siteUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // 创建名为 snapshot 的任务结束
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
|
apply from: 'localandwinboll-maven-publish.gradle'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion project.properties.compileSdkVersion.toInteger()
|
compileSdkVersion project.properties.compileSdkVersion.toInteger()
|
||||||
@@ -37,17 +38,17 @@ task sourceJar(type: Jar) {
|
|||||||
classifier "sources"
|
classifier "sources"
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
//afterEvaluate {
|
||||||
publishing {
|
// publishing {
|
||||||
publications {
|
// publications {
|
||||||
// Creates a Maven publication called "release".
|
// // Creates a Maven publication called "release".
|
||||||
release(MavenPublication) {
|
// release(MavenPublication) {
|
||||||
from components.release
|
// from components.release
|
||||||
groupId = 'com.termux'
|
// groupId = 'com.termux'
|
||||||
artifactId = 'terminal-view'
|
// artifactId = 'terminal-view'
|
||||||
version = '0.118.0'
|
// version = '0.118.0'
|
||||||
artifact(sourceJar)
|
// artifact(sourceJar)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
206
terminal-view/localandwinboll-maven-publish.gradle
Normal file
206
terminal-view/localandwinboll-maven-publish.gradle
Normal file
@@ -0,0 +1,206 @@
|
|||||||
|
// 本机和 WinBoll Maven 仓库传输配置。
|
||||||
|
//
|
||||||
|
|
||||||
|
def siteUrl = 'https://winboll.cc/studio/termux-app' // 项目主页
|
||||||
|
def gitUrl = 'https://gitea.winboll.cc/Studio/termux-app.git' // 项目的git地址
|
||||||
|
def DefaultGroupId = 'com.termux' // 类库GroupId
|
||||||
|
def DefaultArtifactId = 'terminal-view' // 类库ArtifactId
|
||||||
|
def DefaultVersion = '0.118.0' // 版本号
|
||||||
|
def DeveloperId='zhangsken' // 开发者账号
|
||||||
|
def DeveloperName='ZhanGSKen' // 开发者名称
|
||||||
|
def DeveloperEMail='ZhanGSKen@QQ.COM' // 开发者邮箱地址
|
||||||
|
def LicenseName='The Apache Software License, Version 2.0'
|
||||||
|
def LicenseUrl='http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||||
|
def WinBollMavneConfigFile='winboll.properties'
|
||||||
|
|
||||||
|
Properties properties = new Properties()
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
publishing {
|
||||||
|
repositories {
|
||||||
|
if(project.rootProject.file(WinBollMavneConfigFile).exists()) {
|
||||||
|
properties.load(project.rootProject.file(WinBollMavneConfigFile).newDataInputStream())
|
||||||
|
def NexusUserName = properties.getProperty("Nexus.name")
|
||||||
|
def NexusPassword = properties.getProperty("Nexus.password")
|
||||||
|
// WinBoll Release 仓库
|
||||||
|
maven{
|
||||||
|
//仓库的名字和地址
|
||||||
|
name = "WinBollRelease"
|
||||||
|
url="https://nexus.winboll.cc/repository/maven-releases/"
|
||||||
|
// 仓库用户名密码
|
||||||
|
credentials {
|
||||||
|
username = NexusUserName
|
||||||
|
password = NexusPassword
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// WinBoll Snapshot 仓库
|
||||||
|
maven{
|
||||||
|
//仓库的名字和地址
|
||||||
|
name = "WinBollSnapshot"
|
||||||
|
url="https://nexus.winboll.cc/repository/maven-snapshots/"
|
||||||
|
// 仓库用户名密码
|
||||||
|
credentials {
|
||||||
|
username = NexusUserName
|
||||||
|
password = NexusPassword
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
publications {
|
||||||
|
// Local Maven 仓库传输任务
|
||||||
|
//
|
||||||
|
release(MavenPublication) {
|
||||||
|
groupId = DefaultGroupId
|
||||||
|
artifactId = DefaultArtifactId
|
||||||
|
version = DefaultVersion
|
||||||
|
|
||||||
|
//from components.java
|
||||||
|
// 必须有这个 否则不会上传AAR包
|
||||||
|
afterEvaluate { artifact(tasks.getByName("bundleReleaseAar")) }
|
||||||
|
// 上传source,这样使用方可以看到方法注释
|
||||||
|
//artifact generateSourcesJar
|
||||||
|
//要上传的aar路径
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-release.aar"
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-debug.aar"
|
||||||
|
|
||||||
|
//对pom进行的操作
|
||||||
|
pom.withXml{
|
||||||
|
Node pomNode = asNode()
|
||||||
|
pomNode.dependencies.'*'.findAll() {
|
||||||
|
//将所有的默认依赖移除
|
||||||
|
//it.parent().remove(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pom {
|
||||||
|
name = artifactId
|
||||||
|
url = siteUrl
|
||||||
|
licenses {
|
||||||
|
license { //证书说明
|
||||||
|
name=LicenseName // 开源协议名称
|
||||||
|
url=LicenseUrl // 协议地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id=DeveloperId // 开发者账号
|
||||||
|
name=DeveloperName // 开发者名称
|
||||||
|
email=DeveloperEMail // 开发者邮箱地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//软件配置管理
|
||||||
|
scm {
|
||||||
|
connection=gitUrl
|
||||||
|
developerConnection=gitUrl
|
||||||
|
url=siteUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WinBoll Maven Release 仓库传输任务
|
||||||
|
//
|
||||||
|
releaseWinBoll(MavenPublication) {
|
||||||
|
// 需要使用的变体,假设有free和pay两个变体,可以选择一个
|
||||||
|
//from components.free
|
||||||
|
|
||||||
|
groupId = DefaultGroupId // 文件的groupId
|
||||||
|
artifactId = DefaultArtifactId //文件的名字
|
||||||
|
version = DefaultVersion //版本号
|
||||||
|
|
||||||
|
//from components.java
|
||||||
|
// 必须有这个 否则不会上传AAR包
|
||||||
|
afterEvaluate { artifact(tasks.getByName("bundleReleaseAar")) }
|
||||||
|
// 上传source,这样使用方可以看到方法注释
|
||||||
|
//artifact generateSourcesJar
|
||||||
|
//要上传的aar路径
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-release.aar"
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-debug.aar"
|
||||||
|
|
||||||
|
//对pom进行的操作
|
||||||
|
pom.withXml{
|
||||||
|
Node pomNode = asNode()
|
||||||
|
pomNode.dependencies.'*'.findAll() {
|
||||||
|
//将所有的默认依赖移除
|
||||||
|
//it.parent().remove(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pom {
|
||||||
|
name = artifactId
|
||||||
|
url = siteUrl
|
||||||
|
licenses {
|
||||||
|
license { //证书说明
|
||||||
|
name=LicenseName // 开源协议名称
|
||||||
|
url=LicenseUrl // 协议地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id=DeveloperId // 开发者账号
|
||||||
|
name=DeveloperName // 开发者名称
|
||||||
|
email=DeveloperEMail // 开发者邮箱地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//软件配置管理
|
||||||
|
scm {
|
||||||
|
connection=gitUrl
|
||||||
|
developerConnection=gitUrl
|
||||||
|
url=siteUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // 创建名为 release 的任务结束
|
||||||
|
|
||||||
|
// WinBoll Maven Snapshot 仓库传输任务
|
||||||
|
//
|
||||||
|
snapshotWinBoll(MavenPublication) {
|
||||||
|
// 需要使用的变体,假设有free和pay两个变体,可以选择一个
|
||||||
|
//from components.free
|
||||||
|
|
||||||
|
groupId = DefaultGroupId // 文件的groupId
|
||||||
|
artifactId = DefaultArtifactId //文件的名字
|
||||||
|
version = DefaultVersion + "-SNAPSHOT" //版本号
|
||||||
|
|
||||||
|
//from components.java
|
||||||
|
// 必须有这个 否则不会上传AAR包
|
||||||
|
afterEvaluate { artifact(tasks.getByName("bundleReleaseAar")) }
|
||||||
|
// 上传source,这样使用方可以看到方法注释
|
||||||
|
//artifact generateSourcesJar
|
||||||
|
//要上传的aar路径
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-release.aar"
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-debug.aar"
|
||||||
|
|
||||||
|
//对pom进行的操作
|
||||||
|
pom.withXml{
|
||||||
|
Node pomNode = asNode()
|
||||||
|
pomNode.dependencies.'*'.findAll() {
|
||||||
|
//将所有的默认依赖移除
|
||||||
|
//it.parent().remove(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pom {
|
||||||
|
name = artifactId
|
||||||
|
url = siteUrl
|
||||||
|
licenses {
|
||||||
|
license { //证书说明
|
||||||
|
name=LicenseName // 开源协议名称
|
||||||
|
url=LicenseUrl // 协议地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id=DeveloperId // 开发者账号
|
||||||
|
name=DeveloperName // 开发者名称
|
||||||
|
email=DeveloperEMail // 开发者邮箱地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//软件配置管理
|
||||||
|
scm {
|
||||||
|
connection=gitUrl
|
||||||
|
developerConnection=gitUrl
|
||||||
|
url=siteUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // 创建名为 snapshot 的任务结束
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,14 @@
|
|||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
|
apply from: 'localandwinboll-maven-publish.gradle'
|
||||||
|
|
||||||
|
// 定义 lint 输出文件
|
||||||
|
def lintXmlReportFile = file('lint-results.xml')
|
||||||
|
def lintHTMLReportFile = file('lint-results.html')
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
compileSdkVersion project.properties.compileSdkVersion.toInteger()
|
compileSdkVersion project.properties.compileSdkVersion.toInteger()
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -74,17 +81,17 @@ task sourceJar(type: Jar) {
|
|||||||
classifier "sources"
|
classifier "sources"
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
//afterEvaluate {
|
||||||
publishing {
|
// publishing {
|
||||||
publications {
|
// publications {
|
||||||
// Creates a Maven publication called "release".
|
// // Creates a Maven publication called "release".
|
||||||
release(MavenPublication) {
|
// release(MavenPublication) {
|
||||||
from components.release
|
// from components.release
|
||||||
groupId = 'com.termux'
|
// groupId = 'com.termux'
|
||||||
artifactId = 'termux-shared'
|
// artifactId = 'termux-shared'
|
||||||
version = '0.118.0'
|
// version = '0.118.0'
|
||||||
artifact(sourceJar)
|
// artifact(sourceJar)
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
206
termux-shared/localandwinboll-maven-publish.gradle
Normal file
206
termux-shared/localandwinboll-maven-publish.gradle
Normal file
@@ -0,0 +1,206 @@
|
|||||||
|
// 本机和 WinBoll Maven 仓库传输配置。
|
||||||
|
//
|
||||||
|
|
||||||
|
def siteUrl = 'https://winboll.cc/studio/termux-app' // 项目主页
|
||||||
|
def gitUrl = 'https://gitea.winboll.cc/Studio/termux-app.git' // 项目的git地址
|
||||||
|
def DefaultGroupId = 'com.termux' // 类库GroupId
|
||||||
|
def DefaultArtifactId = 'termux-shared' // 类库ArtifactId
|
||||||
|
def DefaultVersion = '0.118.0' // 版本号
|
||||||
|
def DeveloperId='zhangsken' // 开发者账号
|
||||||
|
def DeveloperName='ZhanGSKen' // 开发者名称
|
||||||
|
def DeveloperEMail='ZhanGSKen@QQ.COM' // 开发者邮箱地址
|
||||||
|
def LicenseName='The Apache Software License, Version 2.0'
|
||||||
|
def LicenseUrl='http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||||
|
def WinBollMavneConfigFile='winboll.properties'
|
||||||
|
|
||||||
|
Properties properties = new Properties()
|
||||||
|
|
||||||
|
afterEvaluate {
|
||||||
|
publishing {
|
||||||
|
repositories {
|
||||||
|
if(project.rootProject.file(WinBollMavneConfigFile).exists()) {
|
||||||
|
properties.load(project.rootProject.file(WinBollMavneConfigFile).newDataInputStream())
|
||||||
|
def NexusUserName = properties.getProperty("Nexus.name")
|
||||||
|
def NexusPassword = properties.getProperty("Nexus.password")
|
||||||
|
// WinBoll Release 仓库
|
||||||
|
maven{
|
||||||
|
//仓库的名字和地址
|
||||||
|
name = "WinBollRelease"
|
||||||
|
url="https://nexus.winboll.cc/repository/maven-releases/"
|
||||||
|
// 仓库用户名密码
|
||||||
|
credentials {
|
||||||
|
username = NexusUserName
|
||||||
|
password = NexusPassword
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// WinBoll Snapshot 仓库
|
||||||
|
maven{
|
||||||
|
//仓库的名字和地址
|
||||||
|
name = "WinBollSnapshot"
|
||||||
|
url="https://nexus.winboll.cc/repository/maven-snapshots/"
|
||||||
|
// 仓库用户名密码
|
||||||
|
credentials {
|
||||||
|
username = NexusUserName
|
||||||
|
password = NexusPassword
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
publications {
|
||||||
|
// Local Maven 仓库传输任务
|
||||||
|
//
|
||||||
|
release(MavenPublication) {
|
||||||
|
groupId = DefaultGroupId
|
||||||
|
artifactId = DefaultArtifactId
|
||||||
|
version = DefaultVersion
|
||||||
|
|
||||||
|
//from components.java
|
||||||
|
// 必须有这个 否则不会上传AAR包
|
||||||
|
afterEvaluate { artifact(tasks.getByName("bundleReleaseAar")) }
|
||||||
|
// 上传source,这样使用方可以看到方法注释
|
||||||
|
//artifact generateSourcesJar
|
||||||
|
//要上传的aar路径
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-release.aar"
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-debug.aar"
|
||||||
|
|
||||||
|
//对pom进行的操作
|
||||||
|
pom.withXml{
|
||||||
|
Node pomNode = asNode()
|
||||||
|
pomNode.dependencies.'*'.findAll() {
|
||||||
|
//将所有的默认依赖移除
|
||||||
|
//it.parent().remove(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pom {
|
||||||
|
name = artifactId
|
||||||
|
url = siteUrl
|
||||||
|
licenses {
|
||||||
|
license { //证书说明
|
||||||
|
name=LicenseName // 开源协议名称
|
||||||
|
url=LicenseUrl // 协议地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id=DeveloperId // 开发者账号
|
||||||
|
name=DeveloperName // 开发者名称
|
||||||
|
email=DeveloperEMail // 开发者邮箱地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//软件配置管理
|
||||||
|
scm {
|
||||||
|
connection=gitUrl
|
||||||
|
developerConnection=gitUrl
|
||||||
|
url=siteUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// WinBoll Maven Release 仓库传输任务
|
||||||
|
//
|
||||||
|
releaseWinBoll(MavenPublication) {
|
||||||
|
// 需要使用的变体,假设有free和pay两个变体,可以选择一个
|
||||||
|
//from components.free
|
||||||
|
|
||||||
|
groupId = DefaultGroupId // 文件的groupId
|
||||||
|
artifactId = DefaultArtifactId //文件的名字
|
||||||
|
version = DefaultVersion //版本号
|
||||||
|
|
||||||
|
//from components.java
|
||||||
|
// 必须有这个 否则不会上传AAR包
|
||||||
|
afterEvaluate { artifact(tasks.getByName("bundleReleaseAar")) }
|
||||||
|
// 上传source,这样使用方可以看到方法注释
|
||||||
|
//artifact generateSourcesJar
|
||||||
|
//要上传的aar路径
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-release.aar"
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-debug.aar"
|
||||||
|
|
||||||
|
//对pom进行的操作
|
||||||
|
pom.withXml{
|
||||||
|
Node pomNode = asNode()
|
||||||
|
pomNode.dependencies.'*'.findAll() {
|
||||||
|
//将所有的默认依赖移除
|
||||||
|
//it.parent().remove(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pom {
|
||||||
|
name = artifactId
|
||||||
|
url = siteUrl
|
||||||
|
licenses {
|
||||||
|
license { //证书说明
|
||||||
|
name=LicenseName // 开源协议名称
|
||||||
|
url=LicenseUrl // 协议地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id=DeveloperId // 开发者账号
|
||||||
|
name=DeveloperName // 开发者名称
|
||||||
|
email=DeveloperEMail // 开发者邮箱地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//软件配置管理
|
||||||
|
scm {
|
||||||
|
connection=gitUrl
|
||||||
|
developerConnection=gitUrl
|
||||||
|
url=siteUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} // 创建名为 release 的任务结束
|
||||||
|
|
||||||
|
// WinBoll Maven Snapshot 仓库传输任务
|
||||||
|
//
|
||||||
|
snapshotWinBoll(MavenPublication) {
|
||||||
|
// 需要使用的变体,假设有free和pay两个变体,可以选择一个
|
||||||
|
//from components.free
|
||||||
|
|
||||||
|
groupId = DefaultGroupId // 文件的groupId
|
||||||
|
artifactId = DefaultArtifactId //文件的名字
|
||||||
|
version = DefaultVersion + "-SNAPSHOT" //版本号
|
||||||
|
|
||||||
|
//from components.java
|
||||||
|
// 必须有这个 否则不会上传AAR包
|
||||||
|
afterEvaluate { artifact(tasks.getByName("bundleReleaseAar")) }
|
||||||
|
// 上传source,这样使用方可以看到方法注释
|
||||||
|
//artifact generateSourcesJar
|
||||||
|
//要上传的aar路径
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-release.aar"
|
||||||
|
//artifact "$buildDir/outputs/aar/${project.getName()}-debug.aar"
|
||||||
|
|
||||||
|
//对pom进行的操作
|
||||||
|
pom.withXml{
|
||||||
|
Node pomNode = asNode()
|
||||||
|
pomNode.dependencies.'*'.findAll() {
|
||||||
|
//将所有的默认依赖移除
|
||||||
|
//it.parent().remove(it)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pom {
|
||||||
|
name = artifactId
|
||||||
|
url = siteUrl
|
||||||
|
licenses {
|
||||||
|
license { //证书说明
|
||||||
|
name=LicenseName // 开源协议名称
|
||||||
|
url=LicenseUrl // 协议地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id=DeveloperId // 开发者账号
|
||||||
|
name=DeveloperName // 开发者名称
|
||||||
|
email=DeveloperEMail // 开发者邮箱地址
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//软件配置管理
|
||||||
|
scm {
|
||||||
|
connection=gitUrl
|
||||||
|
developerConnection=gitUrl
|
||||||
|
url=siteUrl
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} // 创建名为 snapshot 的任务结束
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user