diff --git a/tools/data-binding/build.gradle b/tools/data-binding/build.gradle index a35e28050a6f5..3c945c68a3eb1 100644 --- a/tools/data-binding/build.gradle +++ b/tools/data-binding/build.gradle @@ -1,2 +1,12 @@ ext.kotlinVersion = '0.9.206' -ext.releaseVersion = "0.3-SNAPSHOT" \ No newline at end of file +ext.releaseVersion = "0.3" +ext.snapshotVersion = "0.3-SNAPSHOT" + +subprojects { + group = 'com.android.databinding' + version = '0.3-SNAPSHOT' + repositories { + mavenLocal() + mavenCentral() + } +} \ No newline at end of file diff --git a/tools/data-binding/compiler/build.gradle b/tools/data-binding/compiler/build.gradle index 9cf91db76a67d..bc6046e72b0f0 100644 --- a/tools/data-binding/compiler/build.gradle +++ b/tools/data-binding/compiler/build.gradle @@ -17,9 +17,11 @@ apply plugin: 'java' apply plugin: "kotlin" apply plugin: 'maven' + + + buildscript { repositories { - mavenLocal() mavenCentral() } dependencies { @@ -27,10 +29,6 @@ buildscript { } } -repositories { - mavenCentral() - mavenLocal() -} dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" @@ -40,9 +38,6 @@ uploadArchives { repositories { mavenDeployer { repository(url: mavenLocal().url) - pom.version = '0.2-SNAPSHOT' - pom.artifactId = 'compiler' - pom.groupId='com.android.databinding' } } } \ No newline at end of file diff --git a/tools/data-binding/compiler/src/main/java/com/example/databinding/LayoutParser.java b/tools/data-binding/compiler/src/main/java/com/example/databinding/LayoutParser.java index 00770c212b7a3..48d410ea62c9b 100644 --- a/tools/data-binding/compiler/src/main/java/com/example/databinding/LayoutParser.java +++ b/tools/data-binding/compiler/src/main/java/com/example/databinding/LayoutParser.java @@ -29,10 +29,11 @@ import java.util.List; public class LayoutParser { public static void main(String[] args) throws MalformedURLException { + File sampleAppSource = new File("samples/BindingDemo"); KLayoutParser parser = new KLayoutParser("com.android.bindingapp", Arrays.asList(new File("BindingDemo/app/src/main/res")), - new File("BindingDemo/app/build/generated/source/r/debug"), - new File("BindingDemo/app/build/intermediates/res/debug")); + new File(sampleAppSource.getAbsolutePath() + "/app/build/generated/source/r/debug"), + new File(sampleAppSource.getAbsolutePath() + "/app/build/intermediates/res/debug")); parser.process(); parser.writeAttrFile(); parser.writeBrFile(); @@ -41,12 +42,12 @@ public class LayoutParser { URL jarUrl = new File("/Users/yboyar/android/sdk/platforms/android-21/android.jar").toURI().toURL(); URLClassLoader androidClassLoader = new URLClassLoader(new URL[]{jarUrl}); List cpFiles = new ArrayList<>(); - cpFiles.add(new File("BindingApp/app/build/intermediates/classes/debug")); - cpFiles.add(new File("BindingApp/app/build/intermediates/dependency-cache/debug")); + cpFiles.add(new File(sampleAppSource.getAbsolutePath() + "/app/build/intermediates/classes/debug")); + cpFiles.add(new File(sampleAppSource.getAbsolutePath() + "/app/build/intermediates/dependency-cache/debug")); cpFiles.add(new File( - "BindingApp/app/build/intermediates/exploded-aar/com.android.databinding/library/0.1-SNAPSHOT/classes.jar")); + sampleAppSource.getAbsolutePath() + "app/build/intermediates/exploded-aar/com.android.databinding/library/0.2-SNAPSHOT/classes.jar")); cpFiles.add(new File( - "BindingApp/app/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/21.0.0/classes.jar" + sampleAppSource.getAbsolutePath() + "app/build/intermediates/exploded-aar/com.android.support/recyclerview-v7/21.0.2/classes.jar" )); URL[] urls = new URL[cpFiles.size()]; for (int i = 0; i < cpFiles.size(); i++) { diff --git a/tools/data-binding/gradle.properties b/tools/data-binding/gradle.properties new file mode 100644 index 0000000000000..6d493c20cdb37 --- /dev/null +++ b/tools/data-binding/gradle.properties @@ -0,0 +1,35 @@ +# +# Copyright (C) 2014 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx10248m -XX:MaxPermSize=256m +org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=1024m -Dfile.encoding=UTF-8 + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +org.gradle.parallel=true +org.gradle.daemon=true \ No newline at end of file diff --git a/tools/data-binding/gradlePlugin/build.gradle b/tools/data-binding/gradlePlugin/build.gradle index edfc48a078e37..30836ddc043d6 100644 --- a/tools/data-binding/gradlePlugin/build.gradle +++ b/tools/data-binding/gradlePlugin/build.gradle @@ -17,9 +17,9 @@ apply plugin: 'java' apply plugin: "kotlin" apply plugin: 'maven' + buildscript { repositories { - mavenLocal() mavenCentral() } dependencies { @@ -27,25 +27,18 @@ buildscript { } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { compile 'com.android.tools.build:gradle:0.14.2' compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" compile gradleApi() compile 'commons-io:commons-io:2.4' - compile project(':compiler') + compile project(":compiler") } uploadArchives { repositories { mavenDeployer { repository(url: mavenLocal().url) - pom.version = '0.2-SNAPSHOT' pom.artifactId = 'dataBinder' - pom.groupId='com.android.databinding' } } } \ No newline at end of file diff --git a/tools/data-binding/grammerBuilder/build.gradle b/tools/data-binding/grammerBuilder/build.gradle index 8480b84f0d344..5b55bf88d5066 100644 --- a/tools/data-binding/grammerBuilder/build.gradle +++ b/tools/data-binding/grammerBuilder/build.gradle @@ -19,22 +19,8 @@ apply plugin:'application' apply plugin: 'maven' sourceCompatibility = 1.5 -version = '1.0' - mainClassName = "org.antlr.v4.Tool" -buildscript { - repositories { - mavenLocal() - mavenCentral() - } -} - - -repositories { - mavenCentral() -} - run { args "DataBinder.g4", "-visitor", "-o", "src/main/java-gen/com/android/databinding", "-package", "com.android.databinding" } @@ -51,4 +37,13 @@ sourceSets { srcDir 'src/main/java-gen' } } -} \ No newline at end of file +} + +uploadArchives { + repositories { + mavenDeployer { + repository(url: mavenLocal().url) + pom.artifactId = 'grammerBuilder' + } + } +} diff --git a/tools/data-binding/library/build.gradle b/tools/data-binding/library/build.gradle index 4ed3de8aa72c2..e97c54b0cec71 100644 --- a/tools/data-binding/library/build.gradle +++ b/tools/data-binding/library/build.gradle @@ -77,9 +77,7 @@ uploadArchives { repositories { mavenDeployer { repository(url: mavenLocal().url) - pom.version = '0.1-SNAPSHOT' pom.artifactId = 'library' - pom.groupId='com.android.databinding' } } } diff --git a/tools/data-binding/samples/BindingDemo/app/build.gradle b/tools/data-binding/samples/BindingDemo/app/build.gradle index b8536398065d8..45e7ebebfffcb 100644 --- a/tools/data-binding/samples/BindingDemo/app/build.gradle +++ b/tools/data-binding/samples/BindingDemo/app/build.gradle @@ -43,8 +43,8 @@ android { dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:21.+' - compile 'com.android.databinding:library:0.1-SNAPSHOT@aar' - compile 'com.android.support:recyclerview-v7:21.0.5' + compile 'com.android.databinding:library:0.3-SNAPSHOT@aar' + compile 'com.android.support:recyclerview-v7:21.0.2' compile 'com.android.support:gridlayout-v7:21+' - compile 'com.android.support:cardview-v7:21.0.5' + compile 'com.android.support:cardview-v7:21.0.2' } diff --git a/tools/data-binding/samples/BindingDemo/build.gradle b/tools/data-binding/samples/BindingDemo/build.gradle index 31edc85cf1050..6dad139f0c9d7 100644 --- a/tools/data-binding/samples/BindingDemo/build.gradle +++ b/tools/data-binding/samples/BindingDemo/build.gradle @@ -24,7 +24,7 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:0.14.2' - classpath 'com.android.databinding:dataBinder:0.2-SNAPSHOT' + classpath 'com.android.databinding:dataBinder:0.3-SNAPSHOT' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files }