From c541c6e6cf339bca9ba6d495d8f53bac1a75fb60 Mon Sep 17 00:00:00 2001 From: jinghongjun Date: Wed, 18 Jan 2017 14:22:10 +0800 Subject: [PATCH] jinghongjun: Fix build error in ubuntu. Signed-off-by: jinghongjun --- build.gradle | 4 ++++ buildsrc/build.gradle | 9 +++++++++ .../gradle-plugins/com.app.plugin.aspectj.properties | 1 + .../gradle-plugins/com.app.plugin.javassist.properties | 1 + gradle.properties | 9 ++++++++- 5 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 buildsrc/src/main/resources/META-INF/gradle-plugins/com.app.plugin.aspectj.properties create mode 100644 buildsrc/src/main/resources/META-INF/gradle-plugins/com.app.plugin.javassist.properties diff --git a/build.gradle b/build.gradle index b0478ff..474364f 100644 --- a/build.gradle +++ b/build.gradle @@ -5,11 +5,15 @@ buildscript { // maven() { // url 'https://dl.bintray.com/codingbingo/maven' // } + maven{ + url 'file:////u-disk/work/maven_repositories/android/repo' + } } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' classpath 'me.tatarka:gradle-retrolambda:3.2.0' classpath 'org.aspectj:aspectjtools:1.8.9' + classpath 'com.app.plugin:gradleplugin:1.0.0' // classpath 'com.codingbingo.library:gradletaskrecord:1.0.0'//追踪Gradle 任务耗时 } } diff --git a/buildsrc/build.gradle b/buildsrc/build.gradle index 6ec9c40..18eb419 100644 --- a/buildsrc/build.gradle +++ b/buildsrc/build.gradle @@ -1,4 +1,5 @@ apply plugin: 'groovy' +apply plugin: 'maven' dependencies { compile gradleApi()//gradle sdk @@ -7,6 +8,14 @@ dependencies { compile 'org.javassist:javassist:3.20.0-GA' compile 'org.aspectj:aspectjtools:1.8.1' } +uploadArchives { + repositories.mavenDeployer { + repository(url: PLUGIN_URL) + pom.groupId = PLUGIN_GROUP + pom.artifactId = PLUGIN_ARTIFACTID + pom.version = PLUGIN_VERSION + } +} repositories { jcenter() diff --git a/buildsrc/src/main/resources/META-INF/gradle-plugins/com.app.plugin.aspectj.properties b/buildsrc/src/main/resources/META-INF/gradle-plugins/com.app.plugin.aspectj.properties new file mode 100644 index 0000000..98cfb84 --- /dev/null +++ b/buildsrc/src/main/resources/META-INF/gradle-plugins/com.app.plugin.aspectj.properties @@ -0,0 +1 @@ +implementation-class=com.app.plugin.AspectjPlugin \ No newline at end of file diff --git a/buildsrc/src/main/resources/META-INF/gradle-plugins/com.app.plugin.javassist.properties b/buildsrc/src/main/resources/META-INF/gradle-plugins/com.app.plugin.javassist.properties new file mode 100644 index 0000000..1aa23f8 --- /dev/null +++ b/buildsrc/src/main/resources/META-INF/gradle-plugins/com.app.plugin.javassist.properties @@ -0,0 +1 @@ +implementation-class=com.app.plugin.JavassistPlugin \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 30716ed..9f2b59b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -16,4 +16,11 @@ org.gradle.parallel=true # 启用按需加载 org.gradle.configureondemand=true # 启用守护进程 -org.gradle.daemon=true \ No newline at end of file +org.gradle.daemon=true + + +# com.app.plugin +PLUGIN_URL=file:////u-disk/work/maven_repositories/android/repo +PLUGIN_GROUP=com.app.plugin +PLUGIN_ARTIFACTID=gradleplugin +PLUGIN_VERSION=1.0.0