move dependencies from maven to project

This commit is contained in:
Yigit Boyar
2014-12-12 16:45:00 -08:00
parent 090e1db8cc
commit fea204447b
9 changed files with 72 additions and 45 deletions

View File

@@ -1,2 +1,12 @@
ext.kotlinVersion = '0.9.206'
ext.releaseVersion = "0.3-SNAPSHOT"
ext.releaseVersion = "0.3"
ext.snapshotVersion = "0.3-SNAPSHOT"
subprojects {
group = 'com.android.databinding'
version = '0.3-SNAPSHOT'
repositories {
mavenLocal()
mavenCentral()
}
}

View File

@@ -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'
}
}
}

View File

@@ -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<File> 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++) {

View File

@@ -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

View File

@@ -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'
}
}
}

View File

@@ -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'
}
}
}
}
uploadArchives {
repositories {
mavenDeployer {
repository(url: mavenLocal().url)
pom.artifactId = 'grammerBuilder'
}
}
}

View File

@@ -77,9 +77,7 @@ uploadArchives {
repositories {
mavenDeployer {
repository(url: mavenLocal().url)
pom.version = '0.1-SNAPSHOT'
pom.artifactId = 'library'
pom.groupId='com.android.databinding'
}
}
}

View File

@@ -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'
}

View File

@@ -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
}