2BAB / Seal

A Gradle Plugin for resolving AndroidManifest.xml merge conflicts.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error:Could not find method install() for arguments [bintray_6rcjx07b0cwg3oytb1rkljhd5$_run_closure1@211f2539] on project ':blsdk' of type org.gradle.api.Project.

wuao opened this issue · comments

commented

Error:Could not find method install() for arguments [bintray_6rcjx07b0cwg3oytb1rkljhd5$_run_closure1@211f2539] on project ':blsdk' of type org.gradle.api.Project.

我用了你的插件 使用方式是
apply from: 'bintray.gradle'
buildscript {
repositories {
jcenter()
mavenCentral()
}

dependencies {
    classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
    classpath 'com.github.dcendents:android-maven-plugin:1.2'
}

}

allprojects {
repositories {
jcenter()
mavenCentral()
}
}

uploadArchives {
repositories {
mavenDeployer {
repository(url: uri(System.getProperty("user.home") + '/.m2/repository'))
}
}
}
//相关库依赖
def projectRoot = project.getRootProject().rootDir.absolutePath
// 依赖库的 Manifest 文件搜索路径
// 1. Gradle plugin 2.3.0 或者更高版本,会默认开启 build-cache 功能,Release 版本的库会解压到这里
// 2. 但是我们同样需要对 SNAPSHOT 的库做预检查,所以还需要加入 exploded-aar 的目录
// 3. 有更多自定义的目录或者 module,请自行添加
def manifestPath = [
// for AAR of Release
// see note below
projectRoot + '/build-cache',
// for AAR of SNAPSHOT
projectRoot + '/app/build/intermediates/exploded-aar'
]
def removeAttrs = [
'android:debuggable'
]
def replaceValues = [
'android:allowBackup'
]
seal {
enabled = true
manifests = manifestPath
appAttrs {
enabled = true
attrsShouldRemove = removeAttrs
}
appReplaceValues {
enabled = true
valuesShouldRemove = replaceValues
}
}
在我需要打包的model 中 但是出现了这个问题 不知道为什么 是因为这个必须在application 中使用么

  1. 嗯首先你的对我的库引用我没有看到...
  2. 确实只能在 Application 中使用,事实上也只有在 application 中出现 Manifest 合并错误才会真的编译不过(在 library 中多半只是 IDE 会 Warning,但是事实上几乎不会阻断编译错误,会取 library 节点的属性)
commented

我已经高度那个问题了 采用这种 在我合并冲突的那个model 这样就顺利解决了 我这个model 还好引用的东西不是很多 但是我现在遇到一个新的问题 我合并的这个modelA 和modelB 合并成一个aar 然后modelA 里面的ui库没有打入aar

commented

apply from: 'bintray.gradle' 这个不是你用的库导入么 然后使用seal {
enabled = true
manifests = manifestPath
appAttrs {
enabled = true
attrsShouldRemove = removeAttrs
} 使用吧

// project's build.gradle
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.1'
        classpath 'me.xx2bab.gradle:seal-manifest-precheck-plugin:1.0.0'
    }
}

...

// app's build.gradle
apply plugin: 'seal'

请如上做 compile。

另,您写的回复语句不通,无法做进一步的回复...

commented

我知道你的意思 我当然有些这个 只是觉得基本的就没写入