Skip to content

Commit

Permalink
插件上传
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyy0708 committed Dec 19, 2019
1 parent 791f6b4 commit cedd91f
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 1 deletion.
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ buildscript {
classpath "com.android.tools.build:gradle:$gradle_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.1.0"
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// aspectj
// classpath 'com.hujiang.aspectjx:gradle-android-plugin-aspectjx:2.0.2'
// NOTE: Do not place your application dependencies here; they belong
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include ':app', ':base', ':commonres', ':image_loader'
include ':app', ':base', ':commonres', ':image_loader', ':upload_Plugin'
//setBinding(new Binding([gradle: this]))
//evaluate(new File(
// settingsDir.parentFile,
Expand Down
1 change: 1 addition & 0 deletions upload_Plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
15 changes: 15 additions & 0 deletions upload_Plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apply plugin: 'java-library'
apply plugin: 'groovy'

apply plugin: 'com.github.dcendents.android-maven'

group='com.github.chenyy0708'

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation gradleApi()//gradle sdk
implementation localGroovy()//groovy sdk
}

sourceCompatibility = "7"
targetCompatibility = "7"
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import org.gradle.api.Plugin
import org.gradle.api.Project

class UploadApk implements Plugin<Project> {

@Override
void apply(Project project) {

def extension = project.extensions.create('uploadApkInfo', UploadApkPluginExtension)
project.task("assembleWithFirim").doLast {
print("appName:" + extension.appName)
print("appIconPath:" + extension.appIconPath)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class UploadApkPluginExtension {
String appName = ""
String appIconPath = ""
String apiKey = ""
String userKey = ""
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
implementation-class=com.minic.uploadplugin.UploadApk

0 comments on commit cedd91f

Please sign in to comment.