Add Gradle (simple and for android) Project Configurator
This commit is contained in:
@@ -0,0 +1,55 @@
|
||||
apply plugin: 'android'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
project.ext.fakeProvider = new com.android.tests.basic.buildscript.FakeProvider()
|
||||
project.ext.fakeServer = new com.android.tests.basic.buildscript.FakeServer()
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
|
||||
deviceProvider project.ext.fakeProvider
|
||||
testServer project.ext.fakeServer
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
|
||||
project.afterEvaluate {
|
||||
configure(fakeInstrumentTest) {
|
||||
doLast {
|
||||
String error = project.ext.fakeProvider.isValid()
|
||||
if (error != null) {
|
||||
throw new GradleException("Failed DeviceProvider usage: " + error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configure(fake2Upload) {
|
||||
doLast {
|
||||
String error = project.ext.fakeServer.isValid()
|
||||
if (error != null) {
|
||||
throw new GradleException("Failed TestServer usage: " + error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':lib')
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
apply plugin: 'android'
|
||||
|
||||
project.ext.fakeProvider = new com.android.tests.basic.buildscript.FakeProvider()
|
||||
project.ext.fakeServer = new com.android.tests.basic.buildscript.FakeServer()
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
|
||||
deviceProvider project.ext.fakeProvider
|
||||
testServer project.ext.fakeServer
|
||||
}
|
||||
|
||||
project.afterEvaluate {
|
||||
configure(fakeInstrumentTest) {
|
||||
doLast {
|
||||
String error = project.ext.fakeProvider.isValid()
|
||||
if (error != null) {
|
||||
throw new GradleException("Failed DeviceProvider usage: " + error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configure(fake2Upload) {
|
||||
doLast {
|
||||
String error = project.ext.fakeServer.isValid()
|
||||
if (error != null) {
|
||||
throw new GradleException("Failed TestServer usage: " + error)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(':lib')
|
||||
}
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:13.0.0'
|
||||
debugCompile 'com.android.support:support-v13:13.0.0'
|
||||
|
||||
compile 'com.google.android.gms:play-services:3.1.36'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
|
||||
testBuildType "debug"
|
||||
|
||||
signingConfigs {
|
||||
myConfig {
|
||||
storeFile file("debug.keystore")
|
||||
storePassword "android"
|
||||
keyAlias "androiddebugkey"
|
||||
keyPassword "android"
|
||||
}
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
versionCode 12
|
||||
versionName "2.0"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 16
|
||||
|
||||
buildConfig "private final static boolean DEFAULT = true;", \
|
||||
"private final static String FOO = \"foo\";"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
packageNameSuffix ".debug"
|
||||
signingConfig signingConfigs.myConfig
|
||||
|
||||
buildConfig "private final static boolean DEBUG2 = false;"
|
||||
}
|
||||
}
|
||||
|
||||
aaptOptions {
|
||||
noCompress 'txt'
|
||||
ignoreAssetsPattern "!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"
|
||||
}
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:13.0.0'
|
||||
debugCompile 'com.android.support:support-v13:13.0.0'
|
||||
|
||||
compile 'com.google.android.gms:play-services:3.1.36'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
|
||||
testBuildType "debug"
|
||||
|
||||
signingConfigs {
|
||||
myConfig {
|
||||
storeFile file("debug.keystore")
|
||||
storePassword "android"
|
||||
keyAlias "androiddebugkey"
|
||||
keyPassword "android"
|
||||
}
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
versionCode 12
|
||||
versionName "2.0"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 16
|
||||
|
||||
buildConfig "private final static boolean DEFAULT = true;", \
|
||||
"private final static String FOO = \"foo\";"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
packageNameSuffix ".debug"
|
||||
signingConfig signingConfigs.myConfig
|
||||
|
||||
buildConfig "private final static boolean DEBUG2 = false;"
|
||||
}
|
||||
}
|
||||
|
||||
aaptOptions {
|
||||
noCompress 'txt'
|
||||
ignoreAssetsPattern "!.svn:!.git:!.ds_store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~"
|
||||
}
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
|
||||
testBuildType = "staging"
|
||||
|
||||
defaultConfig {
|
||||
buildConfig "private final static boolean DEFAULT = true;", \
|
||||
"private final static String FOO = \"foo\";"
|
||||
}
|
||||
|
||||
productFlavors {
|
||||
f1 {
|
||||
packageName = "com.android.tests.flavored.f1"
|
||||
versionName = "1.0.0-f1"
|
||||
buildConfig "private final static String FLAVOR = \"f1\";"
|
||||
}
|
||||
f2 {
|
||||
packageName = "com.android.tests.flavored.f2"
|
||||
versionName = "1.0.0-f2"
|
||||
buildConfig "private final static String FLAVOR = \"f2\";"
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
packageNameSuffix = ".debug"
|
||||
versionNameSuffix = ".D"
|
||||
buildConfig "private final static boolean DEBUG2 = false;"
|
||||
}
|
||||
staging {
|
||||
packageNameSuffix = ".staging"
|
||||
versionNameSuffix = ".S"
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
|
||||
testBuildType = "staging"
|
||||
|
||||
defaultConfig {
|
||||
buildConfig "private final static boolean DEFAULT = true;", \
|
||||
"private final static String FOO = \"foo\";"
|
||||
}
|
||||
|
||||
productFlavors {
|
||||
f1 {
|
||||
packageName = "com.android.tests.flavored.f1"
|
||||
versionName = "1.0.0-f1"
|
||||
buildConfig "private final static String FLAVOR = \"f1\";"
|
||||
}
|
||||
f2 {
|
||||
packageName = "com.android.tests.flavored.f2"
|
||||
versionName = "1.0.0-f2"
|
||||
buildConfig "private final static String FLAVOR = \"f2\";"
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
packageNameSuffix = ".debug"
|
||||
versionNameSuffix = ".D"
|
||||
buildConfig "private final static boolean DEBUG2 = false;"
|
||||
}
|
||||
staging {
|
||||
packageNameSuffix = ".staging"
|
||||
versionNameSuffix = ".S"
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
manifest {
|
||||
// there's only ever one file so srcFile replaces it.
|
||||
srcFile 'AndroidManifest.xml'
|
||||
}
|
||||
java {
|
||||
// writing:
|
||||
// srcDir 'src'
|
||||
// would *add* to the default folder so we use a different syntax
|
||||
srcDirs = ['src']
|
||||
exclude 'some/unwanted/package/**'
|
||||
}
|
||||
res {
|
||||
srcDirs = ['res']
|
||||
}
|
||||
assets {
|
||||
srcDirs = ['assets']
|
||||
}
|
||||
resources {
|
||||
srcDirs = ['src']
|
||||
}
|
||||
aidl {
|
||||
srcDirs = ['src']
|
||||
}
|
||||
renderscript {
|
||||
srcDirs = ['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')
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
|
||||
// Could also be done with:
|
||||
//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'
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
manifest {
|
||||
// there's only ever one file so srcFile replaces it.
|
||||
srcFile 'AndroidManifest.xml'
|
||||
}
|
||||
java {
|
||||
// writing:
|
||||
// srcDir 'src'
|
||||
// would *add* to the default folder so we use a different syntax
|
||||
srcDirs = ['src']
|
||||
exclude 'some/unwanted/package/**'
|
||||
}
|
||||
res {
|
||||
srcDirs = ['res']
|
||||
}
|
||||
assets {
|
||||
srcDirs = ['assets']
|
||||
}
|
||||
resources {
|
||||
srcDirs = ['src']
|
||||
}
|
||||
aidl {
|
||||
srcDirs = ['src']
|
||||
}
|
||||
renderscript {
|
||||
srcDirs = ['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')
|
||||
|
||||
// Could also be done with:
|
||||
//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'
|
||||
}
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
res {
|
||||
srcDirs 'src/main/res1', 'src/main/res2'
|
||||
}
|
||||
}
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
res {
|
||||
srcDirs 'src/main/res1', 'src/main/res2'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
|
||||
buildTypes.debug {
|
||||
zipAlign true
|
||||
}
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
|
||||
android.applicationVariants.each { variant ->
|
||||
variant.outputFile = file("$project.buildDir/${variant.name}.apk")
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
|
||||
buildTypes.debug {
|
||||
zipAlign true
|
||||
}
|
||||
}
|
||||
|
||||
android.applicationVariants.each { variant ->
|
||||
variant.outputFile = file("$project.buildDir/${variant.name}.apk")
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
apply plugin: 'android'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
|
||||
// query for all (non-test) variants and inject a new step in the builds
|
||||
android.applicationVariants.each { variant ->
|
||||
// create a task that "handles" the compile classes
|
||||
// does some processing (or not)
|
||||
// and outputs a jar
|
||||
def jarTask = tasks.add(name: "jar${variant.name.capitalize()}", type: Jar) {
|
||||
from variant.javaCompile.destinationDir
|
||||
destinationDir file("${buildDir}/jars/${variant.dirName}")
|
||||
baseName "classes"
|
||||
}
|
||||
|
||||
// this task depends on the compilation task
|
||||
jarTask.dependsOn variant.javaCompile
|
||||
|
||||
// now make the dex task depend on it and use its output
|
||||
variant.dex.dependsOn jarTask
|
||||
variant.dex.sourceFiles = files(jarTask.archivePath).files
|
||||
}
|
||||
|
||||
if (android.applicationVariants.size() != 2) {
|
||||
throw new GradleException("Wrong number of app variants!")
|
||||
}
|
||||
|
||||
if (android.testVariants.size() != 1) {
|
||||
throw new GradleException("Wrong number of test variants!")
|
||||
}
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
apply plugin: 'android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
}
|
||||
|
||||
// query for all (non-test) variants and inject a new step in the builds
|
||||
android.applicationVariants.each { variant ->
|
||||
// create a task that "handles" the compile classes
|
||||
// does some processing (or not)
|
||||
// and outputs a jar
|
||||
def jarTask = tasks.add(name: "jar${variant.name.capitalize()}", type: Jar) {
|
||||
from variant.javaCompile.destinationDir
|
||||
destinationDir file("${buildDir}/jars/${variant.dirName}")
|
||||
baseName "classes"
|
||||
}
|
||||
|
||||
// this task depends on the compilation task
|
||||
jarTask.dependsOn variant.javaCompile
|
||||
|
||||
// now make the dex task depend on it and use its output
|
||||
variant.dex.dependsOn jarTask
|
||||
variant.dex.sourceFiles = files(jarTask.archivePath).files
|
||||
}
|
||||
|
||||
if (android.applicationVariants.size() != 2) {
|
||||
throw new GradleException("Wrong number of app variants!")
|
||||
}
|
||||
|
||||
if (android.testVariants.size() != 1) {
|
||||
throw new GradleException("Wrong number of test variants!")
|
||||
}
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'android-library'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'maven'
|
||||
|
||||
repositories {
|
||||
maven { url '../testrepo' }
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.example.android.multiproject:util:1.0'
|
||||
releaseCompile 'com.google.guava:guava:11.0.2'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
|
||||
group = 'com.example.android.multiproject'
|
||||
archivesBaseName = 'baseLib'
|
||||
version = '1.0'
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
repository(url: uri("../testrepo"))
|
||||
}
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'android-library'
|
||||
apply plugin: 'maven'
|
||||
|
||||
repositories {
|
||||
maven { url '../testrepo' }
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.example.android.multiproject:util:1.0'
|
||||
releaseCompile 'com.google.guava:guava:11.0.2'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
}
|
||||
|
||||
group = 'com.example.android.multiproject'
|
||||
archivesBaseName = 'baseLib'
|
||||
version = '1.0'
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
repository(url: uri("../testrepo"))
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
apply plugin: 'android'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// A basic Android application split over a library and a main project.
|
||||
//
|
||||
dependencies {
|
||||
compile project(':lib')
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
apply plugin: 'android'
|
||||
|
||||
android {
|
||||
compileSdkVersion 15
|
||||
buildToolsVersion "17.0"
|
||||
}
|
||||
|
||||
//
|
||||
// A basic Android application split over a library and a main project.
|
||||
//
|
||||
dependencies {
|
||||
compile project(':lib')
|
||||
}
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user