This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 638
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* commit '86fb8efa9f2eb814c3ccb58e80bbf171b9514760': gradle for support lib.
- Loading branch information
Showing
12 changed files
with
396 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
buildscript { | ||
repositories { | ||
maven { url '../../prebuilts/gradle-plugin' } | ||
maven { url '../../prebuilts/tools/common/m2/repository' } | ||
maven { url '../../prebuilts/tools/common/m2/internal' } | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:0.5.7' | ||
} | ||
} | ||
|
||
ext.version = '18.0.1' | ||
|
||
// ext.androidHostOut is shared by all tools/{base,build,swt} gradle projects/ | ||
ext.androidHostOut = file("$rootDir/../../out") | ||
|
||
// rootProject.buildDir is specific to this gradle build. | ||
buildDir = new File(ext.androidHostOut, "host/gradle/frameworks/support/build") | ||
|
||
ext.androidRepoOut = new File(ext.androidHostOut, "host/support_repo/") | ||
|
||
task release(type: Copy) { | ||
from "$rootDir/../../prebuilts/maven_repo/android" | ||
into project.ext.androidRepoOut | ||
} | ||
|
||
subprojects { | ||
// Change buildDir first so that all plugins pick up the new value. | ||
project.buildDir = project.file("$project.parent.buildDir/../$project.name") | ||
|
||
apply plugin: 'maven' | ||
|
||
version = rootProject.ext.version | ||
group = 'com.android.support' | ||
|
||
task release(type: Upload) { | ||
configuration = configurations.archives | ||
repositories { | ||
mavenDeployer { | ||
repository(url: uri("$rootProject.ext.androidRepoOut")) | ||
} | ||
} | ||
} | ||
release.dependsOn rootProject.tasks.release | ||
} | ||
|
||
FileCollection getAndroidPrebuilt(String apiLevel) { | ||
files("$rootDir/../../prebuilts/sdk/$apiLevel/android.jar") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
android.dir=../../ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include 'v4' | ||
include 'v13' | ||
include 'v7:gridlayout' | ||
include 'v7:appcompat' | ||
include 'v7:mediarouter' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
apply plugin: 'java' | ||
|
||
archivesBaseName = 'support-v13' | ||
|
||
sourceSets { | ||
main.java.srcDir 'java' | ||
ics.java.srcDir 'ics' | ||
icsmr1.java.srcDir 'ics-mr1' | ||
k.java.srcDir 'k' | ||
} | ||
|
||
dependencies { | ||
icsCompile getAndroidPrebuilt('14') | ||
|
||
icsmr1Compile getAndroidPrebuilt('15') | ||
|
||
kCompile getAndroidPrebuilt('current') | ||
|
||
// order is important as we need the API 13 before the API 4 so that it uses the latest one. | ||
compile getAndroidPrebuilt('13') | ||
compile project(':v4') | ||
compile sourceSets.ics.output | ||
compile sourceSets.icsmr1.output | ||
compile sourceSets.k.output | ||
} | ||
|
||
jar { | ||
from sourceSets.ics.output | ||
from sourceSets.icsmr1.output | ||
from sourceSets.k.output | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
|
||
repository(url: uri(project.parent.ext.androidRepoOut)) { | ||
} | ||
|
||
pom.project { | ||
name 'Android Support Library v13' | ||
description "The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 13 or later." | ||
url 'http://developer.android.com/tools/extras/support-library.html' | ||
inceptionYear '2011' | ||
|
||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution 'repo' | ||
} | ||
} | ||
|
||
scm { | ||
url "http://source.android.com" | ||
connection "scm:git:https://android.googlesource.com/platform/frameworks/support" | ||
} | ||
developers { | ||
developer { | ||
name 'The Android Open Source Project' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
// configuration for the javadoc to include all source sets. | ||
javadoc { | ||
source sourceSets.main.allJava | ||
source sourceSets.ics.allJava | ||
source sourceSets.icsmr1.allJava | ||
source sourceSets.k.allJava | ||
} | ||
|
||
// custom tasks for creating source/javadoc jars | ||
task sourcesJar(type: Jar, dependsOn:classes) { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
from sourceSets.ics.allSource | ||
from sourceSets.icsmr1.allSource | ||
from sourceSets.k.allSource | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn:javadoc) { | ||
classifier 'javadoc' | ||
from javadoc.destinationDir | ||
} | ||
|
||
// add javadoc/source jar tasks as artifacts | ||
artifacts { | ||
archives jar | ||
archives sourcesJar | ||
archives javadocJar | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
apply plugin: 'java' | ||
|
||
archivesBaseName = 'support-v4' | ||
|
||
sourceSets { | ||
main.java.srcDir 'java' | ||
eclair.java.srcDir 'eclair' | ||
froyo.java.srcDir 'froyo' | ||
gingerbread.java.srcDir 'gingerbread' | ||
honeycomb.java.srcDir 'honeycomb' | ||
honeycombmr2.java.srcDir 'honeycomb_mr2' | ||
ics.java.srcDir 'ics' | ||
icsmr1.java.srcDir 'ics-mr1' | ||
jellybean.java.srcDir 'jellybean' | ||
jellybeanmr1.java.srcDir 'jellybean-mr1' | ||
jellybeanmr2.java.srcDir 'jellybean-mr2' | ||
} | ||
|
||
dependencies { | ||
eclairCompile getAndroidPrebuilt('5') | ||
froyoCompile getAndroidPrebuilt('8') | ||
gingerbreadCompile getAndroidPrebuilt('9') | ||
honeycombCompile getAndroidPrebuilt('11') | ||
honeycombmr2Compile getAndroidPrebuilt('13') | ||
icsCompile getAndroidPrebuilt('14') | ||
icsmr1Compile getAndroidPrebuilt('15') | ||
jellybeanCompile getAndroidPrebuilt('16') | ||
jellybeanmr1Compile getAndroidPrebuilt('17') | ||
jellybeanmr2Compile getAndroidPrebuilt('current') | ||
|
||
compile getAndroidPrebuilt('4') | ||
compile sourceSets.eclair.output | ||
compile sourceSets.froyo.output | ||
compile sourceSets.gingerbread.output | ||
compile sourceSets.honeycomb.output | ||
compile sourceSets.honeycombmr2.output | ||
compile sourceSets.ics.output | ||
compile sourceSets.icsmr1.output | ||
compile sourceSets.jellybean.output | ||
compile sourceSets.jellybeanmr1.output | ||
compile sourceSets.jellybeanmr2.output | ||
} | ||
|
||
|
||
jar { | ||
from sourceSets.eclair.output | ||
from sourceSets.froyo.output | ||
from sourceSets.gingerbread.output | ||
from sourceSets.honeycomb.output | ||
from sourceSets.honeycombmr2.output | ||
from sourceSets.ics.output | ||
from sourceSets.icsmr1.output | ||
from sourceSets.jellybean.output | ||
from sourceSets.jellybeanmr1.output | ||
from sourceSets.jellybeanmr2.output | ||
} | ||
|
||
uploadArchives { | ||
repositories { | ||
mavenDeployer { | ||
repository(url: uri(project.parent.ext.androidRepoOut)) { | ||
} | ||
|
||
pom.project { | ||
name 'Android Support Library v4' | ||
description "The Support Library is a static library that you can add to your Android application in order to use APIs that are either not available for older platform versions or utility APIs that aren't a part of the framework APIs. Compatible on devices running API 4 or later." | ||
url 'http://developer.android.com/tools/extras/support-library.html' | ||
inceptionYear '2011' | ||
|
||
licenses { | ||
license { | ||
name 'The Apache Software License, Version 2.0' | ||
url 'http://www.apache.org/licenses/LICENSE-2.0.txt' | ||
distribution 'repo' | ||
} | ||
} | ||
|
||
scm { | ||
url "http://source.android.com" | ||
connection "scm:git:https://android.googlesource.com/platform/frameworks/support" | ||
} | ||
developers { | ||
developer { | ||
name 'The Android Open Source Project' | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
// configuration for the javadoc to include all source sets. | ||
javadoc { | ||
source sourceSets.main.allJava | ||
source sourceSets.eclair.allJava | ||
source sourceSets.froyo.allJava | ||
source sourceSets.gingerbread.allJava | ||
source sourceSets.honeycomb.allJava | ||
source sourceSets.honeycombmr2.allJava | ||
source sourceSets.ics.allJava | ||
source sourceSets.icsmr1.allJava | ||
source sourceSets.jellybean.allJava | ||
source sourceSets.jellybeanmr1.allJava | ||
} | ||
|
||
// custom tasks for creating source/javadoc jars | ||
task sourcesJar(type: Jar, dependsOn:classes) { | ||
classifier = 'sources' | ||
from sourceSets.main.allSource | ||
from sourceSets.eclair.allSource | ||
from sourceSets.froyo.allSource | ||
from sourceSets.gingerbread.allSource | ||
from sourceSets.honeycomb.allSource | ||
from sourceSets.honeycombmr2.allSource | ||
from sourceSets.ics.allSource | ||
from sourceSets.icsmr1.allSource | ||
from sourceSets.jellybean.allSource | ||
from sourceSets.jellybeanmr1.allSource | ||
} | ||
|
||
task javadocJar(type: Jar, dependsOn:javadoc) { | ||
classifier 'javadoc' | ||
from javadoc.destinationDir | ||
} | ||
|
||
// add javadoc/source jar tasks as artifacts | ||
artifacts { | ||
archives jar | ||
archives sourcesJar | ||
archives javadocJar | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
apply plugin: 'android-library' | ||
|
||
archivesBaseName = 'appcompat-v7' | ||
|
||
dependencies { | ||
compile project(':v4') | ||
} | ||
|
||
android { | ||
compileSdkVersion "current" | ||
buildToolsVersion "17" | ||
|
||
sourceSets { | ||
main.manifest.srcFile 'AndroidManifest.xml' | ||
main.java.srcDir 'src' | ||
main.res.srcDir 'res' | ||
main.assets.srcDir 'assets' | ||
main.resources.srcDir 'src' | ||
instrumentTest.java.srcDir 'tests/src' | ||
|
||
// this moves src/instrumentTest to tests so all folders follow: | ||
// tests/java, tests/res, tests/assets, ... | ||
// This is a *reset* so it replaces the default paths | ||
instrumentTest.setRoot('tests') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apply plugin: 'android-library' | ||
|
||
archivesBaseName = 'gridlayout-v7' | ||
|
||
android { | ||
compileSdkVersion "unstubbed" | ||
buildToolsVersion "17" | ||
|
||
sourceSets { | ||
main.manifest.srcFile 'AndroidManifest.xml' | ||
main.java.srcDir 'src' | ||
main.res.srcDir 'res' | ||
main.assets.srcDir 'assets' | ||
main.resources.srcDir 'src' | ||
instrumentTest.java.srcDir 'tests/src' | ||
|
||
// this moves src/instrumentTest to tests so all folders follow: | ||
// tests/java, tests/res, tests/assets, ... | ||
// This is a *reset* so it replaces the default paths | ||
instrumentTest.setRoot('tests') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,4 +12,4 @@ | |
|
||
# Project target. | ||
target=android-7 | ||
android.library=true | ||
android.library=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.