Skip to content

Commit

Permalink
上传task名,组名修改
Browse files Browse the repository at this point in the history
  • Loading branch information
胡晟昊 committed Nov 13, 2018
1 parent 8dee3d3 commit 032d945
Show file tree
Hide file tree
Showing 36 changed files with 29 additions and 27 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Android assembleRelease Package and auto commit to SVN

buildscript {
dependencies {
classpath 'com.dede.svnplugin:svn-plugin:0.0.8'
classpath 'com.dede.svnplugin:svn-plugin:0.0.9'
}
}

Expand All @@ -38,7 +38,7 @@ Android assembleRelease Package and auto commit to SVN
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath 'gradle.plugin.com.dede.svnplugin:svn-plugin:0.0.8'
classpath 'gradle.plugin.com.dede.svnplugin:svn-plugin:0.0.9'
}
}

Expand All @@ -49,17 +49,17 @@ Android assembleRelease Package and auto commit to SVN
maven { url uri('./repo') }// 仓库路径指向repo文件夹
}
dependencies {
classpath 'com.dede.svnplugin:svn-plugin:0.0.8'
classpath 'com.dede.svnplugin:svn-plugin:0.0.9'
}
}

+ 修改module的build.gradle

apply plugin: 'com.dede.svn-plugin'// 应用插件

同步完成后会生成group为svn plugin的commitReleasePackage2SVN的task,如果有多渠道打包会生成多个相应渠道的task
同步完成后会生成group为svn的assembleReleaseAndCommitSVN的task,如果有多渠道打包会生成多个相应渠道的task

+ 运行task即可生成Release包并上传SVN

./gradlew commitReleasePackage2SVN // or
./gradlew commit${渠道名}ReleasePackage2SVN // 多渠道打包
./gradlew assembleReleaseAndCommitSVN // or
./gradlew assemble${渠道名}ReleaseAndCommitSVN // 多渠道打包
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ buildscript {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.dede.svnplugin:svn-plugin:0.0.8'// groupId:moduleName:version
classpath 'com.dede.svnplugin:svn-plugin:0.0.9'// groupId:moduleName:version
// classpath 'gradle.plugin.com.dede.svnplugin:svn-plugin:0.0.7'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7b433a3bdc6c047df541cc4d02d7d56e
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2378d837145b7724e24774b7889058c34632422a
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e15b04bca8d4866685cbf3c62dd4bb19
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f6c4f6ab4a3af6589b46b08e318dc30f0d774efb
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
45a6dafbb08164f195212ce55914208b
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7f08dc295ffa657301c857fd3ff69c6d3d5c8fd8
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3d444b88991adb8560b76a6809475edc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
885d2a5fffdcd440a223ee3b8fe79cbe8ac23e10
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.dede.svnplugin</groupId>
<artifactId>svn-plugin</artifactId>
<version>0.0.8</version>
<version>0.0.9</version>
<dependencies>
<dependency>
<groupId>com.android.tools.build</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6b1fb5590cfd713228a29308376fbcf9
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cdb42443e0a19bf4628847c2dcd2a961406628d1
5 changes: 3 additions & 2 deletions repo/com/dede/svnplugin/svn-plugin/maven-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
<groupId>com.dede.svnplugin</groupId>
<artifactId>svn-plugin</artifactId>
<versioning>
<release>0.0.8</release>
<release>0.0.9</release>
<versions>
<version>0.0.8</version>
<version>0.0.9</version>
</versions>
<lastUpdated>20181113084221</lastUpdated>
<lastUpdated>20181113093103</lastUpdated>
</versioning>
</metadata>
2 changes: 1 addition & 1 deletion repo/com/dede/svnplugin/svn-plugin/maven-metadata.xml.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1a590b50b4974381ebf8101bc05f01bf
3a8bd349387686add28a67b10eab5931
2 changes: 1 addition & 1 deletion repo/com/dede/svnplugin/svn-plugin/maven-metadata.xml.sha1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9efedec67ae80315bb114bdb776c27db67e9e303
9e4a0d0691550c59fabbc3a72f10330e408e5be4
2 changes: 1 addition & 1 deletion svn-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repositories {
}

group = 'com.dede.svnplugin'
version = '0.0.8'
version = '0.0.9'

pluginBundle {
website = siteUrl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ class SVNPluginImpl implements Plugin<Project> {
if (variant.buildType.name != 'release') return

def variantName = variant.name.capitalize()
def task = project.tasks.create("commit${variantName}Package2SVN",
def task = project.tasks.create("assemble${variantName}AndCommitSVN",
com.dede.svnplugin.task.Commit2SVN.class)// don't remove package
task.setGroup("svn plugin")
task.setGroup("svn")
task.targetProject = project
variant.outputs.each { output ->
task.input = output.outputFile// 设置apk文件路径
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.dede.svnplugin.util.TextUtil;

import org.gradle.api.Project;
import org.gradle.api.ProjectConfigurationException;

import java.io.File;
import java.io.FileInputStream;
Expand Down Expand Up @@ -57,8 +58,8 @@ public ConfigExtension(Project project) {
SVN_URL = properties.getProperty("svn.url");
} catch (IOException e) {
e.printStackTrace();
// throw new ProjectConfigurationException("Plugin load config file " +
// file.getAbsolutePath() + " error", e);
throw new ProjectConfigurationException("Plugin load config file " +
file.getAbsolutePath() + " error", e);
}
}

Expand Down

0 comments on commit 032d945

Please sign in to comment.