Skip to content

Commit cedd91f

Browse files
committed
插件上传
1 parent 791f6b4 commit cedd91f

File tree

7 files changed

+40
-1
lines changed

7 files changed

+40
-1
lines changed

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ buildscript {
1212
classpath "com.android.tools.build:gradle:$gradle_version"
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.1.0"
15+
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
1516
// aspectj
1617
// classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.2'
1718
// NOTE: Do not place your application dependencies here; they belong

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include ':app', ':base', ':commonres', ':image_loader'
1+
include ':app', ':base', ':commonres', ':image_loader', ':upload_Plugin'
22
//setBinding(new Binding([gradle: this]))
33
//evaluate(new File(
44
// settingsDir.parentFile,

upload_Plugin/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

upload_Plugin/build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apply plugin: 'java-library'
2+
apply plugin: 'groovy'
3+
4+
apply plugin: 'com.github.dcendents.android-maven'
5+
6+
group='com.github.chenyy0708'
7+
8+
dependencies {
9+
implementation fileTree(dir: 'libs', include: ['*.jar'])
10+
implementation gradleApi()//gradle sdk
11+
implementation localGroovy()//groovy sdk
12+
}
13+
14+
sourceCompatibility = "7"
15+
targetCompatibility = "7"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import org.gradle.api.Plugin
2+
import org.gradle.api.Project
3+
4+
class UploadApk implements Plugin<Project> {
5+
6+
@Override
7+
void apply(Project project) {
8+
9+
def extension = project.extensions.create('uploadApkInfo', UploadApkPluginExtension)
10+
project.task("assembleWithFirim").doLast {
11+
print("appName:" + extension.appName)
12+
print("appIconPath:" + extension.appIconPath)
13+
}
14+
}
15+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class UploadApkPluginExtension {
2+
String appName = ""
3+
String appIconPath = ""
4+
String apiKey = ""
5+
String userKey = ""
6+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
implementation-class=com.minic.uploadplugin.UploadApk

0 commit comments

Comments
 (0)