Gradle Gripe将POM转换为Gradle

时间:2015-09-04 04:30:21

标签: gradle android-gradle

我正在尝试将Maven Eclipse项目转换为Gradle Android。 Gradle文档很清楚。转到主pom目录和:gradle init

但真正发生的是:

建立失败!无法将Maven转换为POM

显示java.lang.NullPointerException

对于一个用于报告空指针异常的构建工具很恶心!我的意思是,如果你无法转换文件,请不要将其转换并告诉我们原因!为什么会这样?

2013年报告了此问题:https://discuss.gradle.org/t/gradle-setupbuild-exception/2494

好吧,并非一切都可以转换,但地球上的原因是什么?我用过--debug和--stacktrace。我得到的只是转换器,行号和空指针异常。没用的!告诉我Gradle不喜欢什么或为什么不喜欢它!这么多有助于简化配置!

好的,问题是如何手动生成Gradle文件?有谁知道将转换为maven repo的pom文件转换为gradle的步骤?

更新:我发现了这个:http://sgeb.io/articles/how-to-migrate-a-simple-android-app-from-maven-to-gradle/

手动迁移。还有其他建议吗?

我有这样的POM部分:

    <profiles>
    <profile>
        <id>local</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <properties>
            <output.file.name>${output.file.name.prefix}_LOCAL</output.file> <remote.soap.end.point>http://ipaddr:8080/EP2/</remote.soap.end.point> -->
            <remote.soap.end.point>http://ipaddr:8088/EP/</remote.soap.end.point>
            <skip.proguard>true</skip.proguard>
            <dev.mode>true</dev.mode>
        </properties>
    </profile>

这是DSL级别的任何文档吗?

排除我如何得到它们:

 <dependency>
        <groupId>com.google.android</groupId>
        <artifactId>android</artifactId>
        <version>${android.version}</version>
        <scope>provided</scope>
        <exclusions>
            <exclusion>
                <groupId>xpp3</groupId>
                <artifactId>xpp3</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
            </exclusion>
            <exclusion>
                <groupId>xerces</groupId>
                <artifactId>xmlParserAPIs</artifactId>
            </exclusion>
            <!-- <exclusion> <artifactId>httpclient</artifactId>    <groupId>org.apache.httpcomponents</groupId> </exclusion> -->
        </exclusions>
    </dependency>

父母怎么样?主要的神器是什么?我该怎么办?:

 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<!-- ================================================================================== -->
<!-- Basic informations -->
<!-- ================================================================================== -->
<artifactId>main_art_id/artifactId>
<packaging>apk</packaging>

<!-- ================================================================================== -->
<!-- Module informations -->
<!-- ================================================================================== -->
<name>mymoduleName</name> 

<parent>
    <groupId>com.mygroupId</groupId>
    <artifactId>my-set</artifactId>
    <version>4.3.SNAPSHOT</version>
</parent>

<!-- ================================================================================== -->
<!-- Properties informations -->
<!-- ================================================================================== -->
<properties>

    <!-- Using with jaxb-api. -->
    <android.dex.coreLibrary>true</android.dex.coreLibrary> 

我对狡猾的RTFM评论感到满意,但是在手册中它确实说明了如何处理上述每个项目?

0 个答案:

没有答案
相关问题