Skip to content

Commit

Permalink
add code
Browse files Browse the repository at this point in the history
  • Loading branch information
jiawulu committed Mar 15, 2017
1 parent 926be9f commit 94cca2c
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 81 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ build
/captures
!**/src/main/java/com/android/build/**
[email protected]
publish_mvn.gradle
publish_bintray.gradle
**/publish_.*
73 changes: 1 addition & 72 deletions atlas-gradle-plugin/atlas-plugin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'idea'

archivesBaseName = 'atlasplugin'

sourceSets {
main {
Expand Down Expand Up @@ -30,72 +27,4 @@ dependencies {
}


//
//apply plugin: 'maven-publish'
//apply plugin: 'com.github.dcendents.android-maven'
//apply plugin: 'com.jfrog.bintray'
//def siteUrl = 'https://github.com/alibaba/atlas'
//// 项目的主页
//def gitUrl = 'https://github.com/alibaba/atlas'
//// Git仓库的url
//install {
// repositories.mavenInstaller {
// // This generates POM.xml with proper parameters
// pom {
// project {
// packaging 'jar'
// // Add your description here
// name 'atlasplugin' //项目描述
// // Set your license
// licenses {
// license {
// name 'The Apache Software License, Version 2.0'
// url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
// }
// }
// developers {
// developer {
// id 'alibabaatlas' //填写的一些基本信息
// name 'atlasplugin'
// email '[email protected]'
// }
// }
// scm {
// connection gitUrl
// developerConnection gitUrl
// url siteUrl
// }
// }
// }
// }
//}
//
//Properties properties = new Properties()
//def file = project.rootProject.file('local.properties')
//if (file.exists()) {
// properties.load(file.newDataInputStream())
//}
//bintray {
// user = properties.getProperty("bintray.user")
// key = properties.getProperty("bintray.apikey")
// configurations = ['archives']
// pkg {
// repo = "maven"
// name = "atlasplugin" //发布到JCenter上的项目名字
// websiteUrl = "atlas.alibaba.net"
// vcsUrl = gitUrl
// licenses = ["Apache-2.0"]
// publish = true
// }
//}
//
//task sourcesJar(type: Jar) {
// from('src/main/java') {
// include '**'
// }
// classifier = 'sources'
//}
//
//artifacts {
// archives sourcesJar
//}
version = '2.3.0.alpha1-SNAPSHOT'
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public class ManifestOptions {
private boolean replaceApplication = true;

@JSONField(serialize = false)
private boolean addMultiDexMetaData;
private boolean addMultiDexMetaData = false;

private boolean removeProvider = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ public void updateExtensionAfterEvaluate() {
tBuildConfig.setClassInject(true);
tBuildConfig.setCreateAP(true);
tBuildConfig.setUseCustomAapt(true);
atlasExtension.getManifestOptions().setAddMultiDexMetaData(true);
atlasExtension.getManifestOptions().setAddBundleLocation(true);
atlasExtension.getManifestOptions().setReplaceApplication(true);
} else {
atlasExtension.getManifestOptions().setReplaceApplication(false);
Expand Down
20 changes: 12 additions & 8 deletions atlas-gradle-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ buildscript {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
//引入其他的插件
}

}


Expand All @@ -25,19 +24,25 @@ task wrapper(type: Wrapper) {
distributionUrl = 'http://services.gradle.org/distributions/gradle-2.12-all.zip'
}

subprojects{
subprojects {

if (!project.getBuildFile().exists()){
return ;
if (!project.getBuildFile().exists()) {
return;
}

repositories {
def command = project.getGradle().startParameter.toString()
def publishFile = new File(
project.getRootDir(),
"publish_" + (command.contains("bintray") ? "bintray" : "mvn") + ".gradle");

if (publishFile.exists()) {
apply from: publishFile.getAbsolutePath()
}

repositories {
//本地库,local repository(${user.home}/.m2/repository)
mavenLocal()

jcenter()

}

group = 'com.taobao.android'
Expand All @@ -46,5 +51,4 @@ subprojects{
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

}

0 comments on commit 94cca2c

Please sign in to comment.