From 11a5cc020e6e29858e9550ea69ca0051c56901e0 Mon Sep 17 00:00:00 2001 From: ZhanGSKen Date: Sun, 15 Mar 2026 15:01:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E7=95=99=E5=BA=94=E7=94=A8=E7=AD=BE?= =?UTF-8?q?=E5=90=8D=E4=B8=8EWinBoLL=E4=B8=BB=E6=9C=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=8C=E6=9B=B4=E6=96=B0=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 + terminal-emulator/build.gradle | 29 +-- .../localandwinboll-maven-publish.gradle | 206 ++++++++++++++++++ terminal-view/build.gradle | 29 +-- .../localandwinboll-maven-publish.gradle | 206 ++++++++++++++++++ termux-shared/build.gradle | 35 +-- .../localandwinboll-maven-publish.gradle | 206 ++++++++++++++++++ 7 files changed, 675 insertions(+), 42 deletions(-) create mode 100644 terminal-emulator/localandwinboll-maven-publish.gradle create mode 100644 terminal-view/localandwinboll-maven-publish.gradle create mode 100644 termux-shared/localandwinboll-maven-publish.gradle diff --git a/.gitignore b/.gitignore index a52cbb33..8ba0bb33 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,9 @@ local.properties .swp ehthumbs.db Thumbs.db + +## WinBoLL Studio Configs +winboll.properties +appkey.jks +appkey.keystore + diff --git a/terminal-emulator/build.gradle b/terminal-emulator/build.gradle index afc57e9f..4d7ad87f 100644 --- a/terminal-emulator/build.gradle +++ b/terminal-emulator/build.gradle @@ -1,5 +1,6 @@ apply plugin: 'com.android.library' apply plugin: 'maven-publish' +apply from: 'localandwinboll-maven-publish.gradle' android { compileSdkVersion project.properties.compileSdkVersion.toInteger() @@ -59,17 +60,17 @@ task sourceJar(type: Jar) { classifier "sources" } -afterEvaluate { - publishing { - publications { - // Creates a Maven publication called "release". - release(MavenPublication) { - from components.release - groupId = 'com.termux' - artifactId = 'terminal-emulator' - version = '0.118.0' - artifact(sourceJar) - } - } - } -} +//afterEvaluate { +// publishing { +// publications { +// // Creates a Maven publication called "release". +// release(MavenPublication) { +// from components.release +// groupId = 'com.termux' +// artifactId = 'terminal-emulator' +// version = '0.118.0' +// artifact(sourceJar) +// } +// } +// } +//} diff --git a/terminal-emulator/localandwinboll-maven-publish.gradle b/terminal-emulator/localandwinboll-maven-publish.gradle new file mode 100644 index 00000000..dc75dc49 --- /dev/null +++ b/terminal-emulator/localandwinboll-maven-publish.gradle @@ -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 的任务结束 + } + } +} diff --git a/terminal-view/build.gradle b/terminal-view/build.gradle index d603da28..e4121c39 100644 --- a/terminal-view/build.gradle +++ b/terminal-view/build.gradle @@ -1,5 +1,6 @@ apply plugin: 'com.android.library' apply plugin: 'maven-publish' +apply from: 'localandwinboll-maven-publish.gradle' android { compileSdkVersion project.properties.compileSdkVersion.toInteger() @@ -37,17 +38,17 @@ task sourceJar(type: Jar) { classifier "sources" } -afterEvaluate { - publishing { - publications { - // Creates a Maven publication called "release". - release(MavenPublication) { - from components.release - groupId = 'com.termux' - artifactId = 'terminal-view' - version = '0.118.0' - artifact(sourceJar) - } - } - } -} +//afterEvaluate { +// publishing { +// publications { +// // Creates a Maven publication called "release". +// release(MavenPublication) { +// from components.release +// groupId = 'com.termux' +// artifactId = 'terminal-view' +// version = '0.118.0' +// artifact(sourceJar) +// } +// } +// } +//} diff --git a/terminal-view/localandwinboll-maven-publish.gradle b/terminal-view/localandwinboll-maven-publish.gradle new file mode 100644 index 00000000..306f4e71 --- /dev/null +++ b/terminal-view/localandwinboll-maven-publish.gradle @@ -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 的任务结束 + } + } +} diff --git a/termux-shared/build.gradle b/termux-shared/build.gradle index d44a8e45..2fe1f322 100644 --- a/termux-shared/build.gradle +++ b/termux-shared/build.gradle @@ -1,7 +1,14 @@ apply plugin: 'com.android.library' apply plugin: 'maven-publish' +apply from: 'localandwinboll-maven-publish.gradle' + +// 定义 lint 输出文件 +def lintXmlReportFile = file('lint-results.xml') +def lintHTMLReportFile = file('lint-results.html') + android { + compileSdkVersion project.properties.compileSdkVersion.toInteger() dependencies { @@ -74,17 +81,17 @@ task sourceJar(type: Jar) { classifier "sources" } -afterEvaluate { - publishing { - publications { - // Creates a Maven publication called "release". - release(MavenPublication) { - from components.release - groupId = 'com.termux' - artifactId = 'termux-shared' - version = '0.118.0' - artifact(sourceJar) - } - } - } -} +//afterEvaluate { +// publishing { +// publications { +// // Creates a Maven publication called "release". +// release(MavenPublication) { +// from components.release +// groupId = 'com.termux' +// artifactId = 'termux-shared' +// version = '0.118.0' +// artifact(sourceJar) +// } +// } +// } +//} diff --git a/termux-shared/localandwinboll-maven-publish.gradle b/termux-shared/localandwinboll-maven-publish.gradle new file mode 100644 index 00000000..0af19d8e --- /dev/null +++ b/termux-shared/localandwinboll-maven-publish.gradle @@ -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 的任务结束 + } + } +}