Add Gradle (simple and for android) Project Configurator
This commit is contained in:
@@ -42,6 +42,7 @@ import org.jetbrains.jet.modules.xml.AbstractModuleXmlParserTest;
|
||||
import org.jetbrains.jet.plugin.codeInsight.moveUpDown.AbstractCodeMoverTest;
|
||||
import org.jetbrains.jet.plugin.codeInsight.surroundWith.AbstractSurroundWithTest;
|
||||
import org.jetbrains.jet.plugin.codeInsight.unwrap.AbstractUnwrapRemoveTest;
|
||||
import org.jetbrains.jet.plugin.configuration.AbstractConfigureGradleProjectTest;
|
||||
import org.jetbrains.jet.plugin.folding.AbstractKotlinFoldingTest;
|
||||
import org.jetbrains.jet.plugin.hierarchy.AbstractHierarchyTest;
|
||||
import org.jetbrains.jet.plugin.highlighter.AbstractDeprecatedHighlightingTest;
|
||||
@@ -455,6 +456,14 @@ public class GenerateTests {
|
||||
AbstractJetFindUsagesTest.class,
|
||||
testModelWithPattern("idea/testData/findUsages", "^(.+).0.kt$", "doTest")
|
||||
);
|
||||
|
||||
generateTest(
|
||||
"idea/tests/",
|
||||
"ConfigureGradleProjectTestGenerated",
|
||||
AbstractConfigureGradleProjectTest.class,
|
||||
new SimpleTestClassModel(new File("idea/testData/configuration/android-gradle"), true, Pattern.compile("(\\w+)_before\\.gradle$"), "doTestAndroidGradle"),
|
||||
new SimpleTestClassModel(new File("idea/testData/configuration/gradle"), true, Pattern.compile("(\\w+)_before\\.gradle$"), "doTestGradle")
|
||||
);
|
||||
}
|
||||
|
||||
private static SimpleTestClassModel testModel(@NotNull String rootPath) {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<idea-plugin>
|
||||
<extensions defaultExtensionNs="com.intellij">
|
||||
<extensions defaultExtensionNs="org.jetbrains.kotlin">
|
||||
<projectConfigurator implementation="org.jetbrains.jet.plugin.configuration.KotlinAndroidGradleModuleConfigurator"/>
|
||||
<projectConfigurator implementation="org.jetbrains.jet.plugin.configuration.KotlinGradleModuleConfigurator"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
@@ -41,6 +41,7 @@ import org.jetbrains.jet.lang.types.ErrorUtils;
|
||||
import org.jetbrains.jet.lang.types.JetType;
|
||||
import org.jetbrains.jet.lang.types.lang.KotlinBuiltIns;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.LinkedList;
|
||||
|
||||
public class JetPluginUtil {
|
||||
@@ -148,4 +149,20 @@ public class JetPluginUtil {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isGradleModule(@NotNull Module module) {
|
||||
VirtualFile moduleFile = module.getModuleFile();
|
||||
if (moduleFile == null) return false;
|
||||
|
||||
String moduleFilePath = moduleFile.getPath();
|
||||
String buildGradle = moduleFilePath.replace(moduleFile.getName(), "build.gradle");
|
||||
|
||||
return new File(buildGradle).exists();
|
||||
}
|
||||
|
||||
public static boolean isMavenModule(@NotNull Module module) {
|
||||
// This constant could be acquired from MavenProjectsManager, but we don't want to depend on the Maven plugin...
|
||||
// See MavenProjectsManager.isMavenizedModule()
|
||||
return "true".equals(module.getOptionValue("org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule"));
|
||||
}
|
||||
}
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package org.jetbrains.jet.plugin.configuration;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.plugin.JetPluginUtil;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.GroovyFile;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.blocks.GrClosableBlock;
|
||||
|
||||
public class KotlinAndroidGradleModuleConfigurator extends KotlinWithGradleConfigurator {
|
||||
public static final String NAME = "android-gradle";
|
||||
|
||||
private static final String APPLY_KOTLIN_ANDROID = "apply plugin: 'kotlin-android'";
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getName() {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getPresentableText() {
|
||||
return "As Android project with Gradle";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isApplicable(@NotNull Module module) {
|
||||
return JetPluginUtil.isAndroidGradleModule(module);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getApplyPluginDirective() {
|
||||
return APPLY_KOTLIN_ANDROID;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addSourceSetsBlock(@NotNull GroovyFile file) {
|
||||
GrClosableBlock androidBlock = getAndroidBlock(file);
|
||||
addLastExpressionInBlockIfNeeded(SOURCE_SET, getSourceSetsBlock(androidBlock));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static GrClosableBlock getAndroidBlock(@NotNull GroovyFile file) {
|
||||
return getBlockOrCreate(file, "android");
|
||||
}
|
||||
|
||||
KotlinAndroidGradleModuleConfigurator() {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright 2010-2013 JetBrains s.r.o.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.plugin.configuration;
|
||||
|
||||
import com.intellij.openapi.module.Module;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.plugin.JetPluginUtil;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.GroovyFile;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.api.statements.blocks.GrClosableBlock;
|
||||
|
||||
public class KotlinGradleModuleConfigurator extends KotlinWithGradleConfigurator {
|
||||
public static final String NAME = "gradle";
|
||||
|
||||
private static final String APPLY_KOTLIN = "apply plugin: 'kotlin'";
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getName() {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String getPresentableText() {
|
||||
return "As Gradle project";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isApplicable(@NotNull Module module) {
|
||||
return JetPluginUtil.isGradleModule(module) &&
|
||||
!JetPluginUtil.isAndroidGradleModule(module);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getApplyPluginDirective() {
|
||||
return APPLY_KOTLIN;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addSourceSetsBlock(@NotNull GroovyFile file) {
|
||||
GrClosableBlock sourceSetBlock = getSourceSetsBlock(file);
|
||||
addLastExpressionInBlockIfNeeded(SOURCE_SET, sourceSetBlock);
|
||||
}
|
||||
|
||||
KotlinGradleModuleConfigurator() {
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import com.intellij.openapi.vfs.VfsUtilCore;
|
||||
import com.intellij.util.Processor;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.plugin.JetPluginUtil;
|
||||
import org.jetbrains.jet.plugin.framework.ui.FileUIUtils;
|
||||
|
||||
import java.io.File;
|
||||
@@ -42,7 +43,7 @@ public abstract class KotlinWithLibraryConfigurator implements KotlinProjectConf
|
||||
|
||||
@Override
|
||||
public boolean isApplicable(@NotNull Module module) {
|
||||
return true;
|
||||
return !JetPluginUtil.isAndroidGradleModule(module) && !JetPluginUtil.isMavenModule(module) && !JetPluginUtil.isGradleModule(module);
|
||||
}
|
||||
|
||||
public boolean isJarPresent(@NotNull String dir) {
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url 'http://oss.sonatype.org/content/repositories/snapshots'
|
||||
}
|
||||
}
|
||||
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()
|
||||
maven {
|
||||
url 'http://oss.sonatype.org/content/repositories/snapshots'
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 17
|
||||
buildToolsVersion "17.0.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 7
|
||||
targetSdkVersion 16
|
||||
}
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:13.0.0'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
|
||||
// VERSION: $VERSION$
|
||||
@@ -0,0 +1,29 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 17
|
||||
buildToolsVersion "17.0.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 7
|
||||
targetSdkVersion 16
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:13.0.0'
|
||||
}
|
||||
|
||||
// VERSION: 0.1-SNAPSHOT
|
||||
@@ -0,0 +1,34 @@
|
||||
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 17
|
||||
buildToolsVersion "17.0.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 7
|
||||
targetSdkVersion 16
|
||||
}
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:13.0.0'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 17
|
||||
buildToolsVersion "17.0.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 7
|
||||
targetSdkVersion 16
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:13.0.0'
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
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 {
|
||||
target = 'android-16'
|
||||
defaultConfig {
|
||||
packageName = 'com.example'
|
||||
signingStoreLocation = 'keystore'
|
||||
signingStorePassword = 'helloworld'
|
||||
signingKeyAlias = 'Key'
|
||||
signingKeyPassword = 'helloworld'
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
buildConfig "public final static boolean IS_LIVE=true;"
|
||||
}
|
||||
debug {
|
||||
buildConfig "public final static boolean IS_LIVE=false;"
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'android'
|
||||
|
||||
android {
|
||||
target = 'android-16'
|
||||
defaultConfig {
|
||||
packageName = 'com.example'
|
||||
signingStoreLocation = 'keystore'
|
||||
signingStorePassword = 'helloworld'
|
||||
signingKeyAlias = 'Key'
|
||||
signingKeyPassword = 'helloworld'
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
buildConfig "public final static boolean IS_LIVE=true;"
|
||||
}
|
||||
debug {
|
||||
buildConfig "public final static boolean IS_LIVE=false;"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
apply plugin: 'kotlin-android'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
android {
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
@@ -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.+'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
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 {
|
||||
target = 'android-16'
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'android'
|
||||
|
||||
android {
|
||||
target = 'android-16'
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.2'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'android-library'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
android {
|
||||
target = 'android-16'
|
||||
sourceSets {
|
||||
main {
|
||||
manifest {
|
||||
srcFile 'AndroidManifest.xml'
|
||||
}
|
||||
java {
|
||||
srcDir 'src'
|
||||
}
|
||||
res {
|
||||
srcDir 'res'
|
||||
}
|
||||
assets {
|
||||
srcDir 'assets'
|
||||
}
|
||||
resources {
|
||||
srcDir 'src'
|
||||
}
|
||||
aidl {
|
||||
srcDir 'src'
|
||||
}
|
||||
}
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.2'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'android-library'
|
||||
|
||||
android {
|
||||
target = 'android-16'
|
||||
sourceSets {
|
||||
main {
|
||||
manifest {
|
||||
srcFile 'AndroidManifest.xml'
|
||||
}
|
||||
java {
|
||||
srcDir 'src'
|
||||
}
|
||||
res {
|
||||
srcDir 'res'
|
||||
}
|
||||
assets {
|
||||
srcDir 'assets'
|
||||
}
|
||||
resources {
|
||||
srcDir 'src'
|
||||
}
|
||||
aidl {
|
||||
srcDir 'src'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
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: 'kotlin-android'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 17
|
||||
buildToolsVersion "17.0.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 7
|
||||
targetSdkVersion 16
|
||||
}
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:13.0.0'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 17
|
||||
buildToolsVersion "17.0.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 7
|
||||
targetSdkVersion 16
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:13.0.0'
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
apply plugin: 'android'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 17
|
||||
buildToolsVersion "17.0.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 7
|
||||
targetSdkVersion 16
|
||||
}
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:13.0.0'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
apply plugin: 'android'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 17
|
||||
buildToolsVersion "17.0.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 7
|
||||
targetSdkVersion 16
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:13.0.0'
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url 'http://oss.sonatype.org/content/repositories/snapshots'
|
||||
}
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
apply plugin: 'kotlin-android'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url 'http://oss.sonatype.org/content/repositories/snapshots'
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 17
|
||||
buildToolsVersion "17.0.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 7
|
||||
targetSdkVersion 16
|
||||
}
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:13.0.0'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
|
||||
// VERSION: $VERSION$
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
buildscript {
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
apply plugin: 'android'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 17
|
||||
buildToolsVersion "17.0.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 7
|
||||
targetSdkVersion 16
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:13.0.0'
|
||||
}
|
||||
|
||||
// VERSION: 0.1-SNAPSHOT
|
||||
@@ -0,0 +1,34 @@
|
||||
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 {
|
||||
target = 'android-16'
|
||||
productFlavors {
|
||||
playstore {
|
||||
packageName = 'com.example.android.gradle.productflavors.playstore'
|
||||
}
|
||||
amazonappstore {
|
||||
packageName = 'com.example.android.gradle.productflavors.amazonappstore'
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:0.5.+'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'android'
|
||||
|
||||
android {
|
||||
target = 'android-16'
|
||||
productFlavors {
|
||||
playstore {
|
||||
packageName = 'com.example.android.gradle.productflavors.playstore'
|
||||
}
|
||||
amazonappstore {
|
||||
packageName = 'com.example.android.gradle.productflavors.amazonappstore'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
sourceCompatibility = 1.5
|
||||
version = '1.0'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
apply plugin: 'java'
|
||||
|
||||
sourceCompatibility = 1.5
|
||||
version = '1.0'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
sourceCompatibility = 1.5
|
||||
version = '1.0'
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$ext.kotlin_version"
|
||||
}
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '$VERSION$'
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'kotlin'
|
||||
|
||||
sourceCompatibility = 1.5
|
||||
version = '1.0'
|
||||
|
||||
dependencies {
|
||||
testCompile group: 'junit', name: 'junit', version: '4.11'
|
||||
}
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$ext.kotlin_version"
|
||||
}
|
||||
}
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright 2010-2013 JetBrains s.r.o.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.plugin.configuration;
|
||||
|
||||
import com.intellij.testFramework.LightCodeInsightTestCase;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.InTextDirectivesUtils;
|
||||
import org.jetbrains.plugins.groovy.lang.psi.GroovyFile;
|
||||
|
||||
public abstract class AbstractConfigureGradleProjectTest extends LightCodeInsightTestCase {
|
||||
private static final String DEFAULT_VERSION = "default_version";
|
||||
|
||||
public void doTestAndroidGradle(@NotNull String path) throws Exception {
|
||||
doTest(path, new KotlinAndroidGradleModuleConfigurator());
|
||||
}
|
||||
|
||||
public void doTestGradle(@NotNull String path) throws Exception {
|
||||
doTest(path, new KotlinGradleModuleConfigurator());
|
||||
}
|
||||
|
||||
private void doTest(@NotNull String path, @NotNull KotlinWithGradleConfigurator configurator) throws Exception {
|
||||
configureByFile(path);
|
||||
GroovyFile groovyFile = (GroovyFile) getFile();
|
||||
|
||||
String versionFromFile = InTextDirectivesUtils.findStringWithPrefixes(groovyFile.getText(), "// VERSION:");
|
||||
String version = versionFromFile != null ? versionFromFile : DEFAULT_VERSION;
|
||||
|
||||
configurator.changeGradleFile(groovyFile, version);
|
||||
|
||||
assertSameLinesWithFile(path.replace("before", "after"), groovyFile.getText().replace(version, "$VERSION$"));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected String getTestDataPath() {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
+182
@@ -0,0 +1,182 @@
|
||||
/*
|
||||
* Copyright 2010-2013 JetBrains s.r.o.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.jet.plugin.configuration;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.regex.Pattern;
|
||||
import org.jetbrains.jet.JetTestUtils;
|
||||
import org.jetbrains.jet.test.InnerTestClasses;
|
||||
import org.jetbrains.jet.test.TestMetadata;
|
||||
|
||||
import org.jetbrains.jet.plugin.configuration.AbstractConfigureGradleProjectTest;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.jet.generators.tests.GenerateTests}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@InnerTestClasses({ConfigureGradleProjectTestGenerated.Android_gradle.class, ConfigureGradleProjectTestGenerated.Gradle.class})
|
||||
public class ConfigureGradleProjectTestGenerated extends AbstractConfigureGradleProjectTest {
|
||||
@TestMetadata("idea/testData/configuration/android-gradle")
|
||||
@InnerTestClasses({Android_gradle.GradleExamples.class})
|
||||
public static class Android_gradle extends AbstractConfigureGradleProjectTest {
|
||||
public void testAllFilesPresentInAndroid_gradle() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("idea/testData/configuration/android-gradle"), Pattern.compile("(\\w+)_before\\.gradle$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("androidStudioDefault_before.gradle")
|
||||
public void testAndroidStudioDefault() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/androidStudioDefault_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("androidStudioDefaultShapshot_before.gradle")
|
||||
public void testAndroidStudioDefaultShapshot() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/androidStudioDefaultShapshot_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("buildConfigs_before.gradle")
|
||||
public void testBuildConfigs() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/buildConfigs_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyDependencyList_before.gradle")
|
||||
public void testEmptyDependencyList() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/emptyDependencyList_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyFile_before.gradle")
|
||||
public void testEmptyFile() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/emptyFile_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("helloWorld_before.gradle")
|
||||
public void testHelloWorld() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/helloWorld_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("libraryFile_before.gradle")
|
||||
public void testLibraryFile() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/libraryFile_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("missedApplyAndroidStatement_before.gradle")
|
||||
public void testMissedApplyAndroidStatement() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/missedApplyAndroidStatement_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("missedBuildscriptBlock_before.gradle")
|
||||
public void testMissedBuildscriptBlock() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/missedBuildscriptBlock_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("missedRepositoriesInBuildscriptBlock_before.gradle")
|
||||
public void testMissedRepositoriesInBuildscriptBlock() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/missedRepositoriesInBuildscriptBlock_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("productFlavor_before.gradle")
|
||||
public void testProductFlavor() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/productFlavor_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/configuration/android-gradle/gradleExamples")
|
||||
public static class GradleExamples extends AbstractConfigureGradleProjectTest {
|
||||
public void testAllFilesPresentInGradleExamples() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("idea/testData/configuration/android-gradle/gradleExamples"), Pattern.compile("(\\w+)_before\\.gradle$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("gradleExample0_before.gradle")
|
||||
public void testGradleExample0() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/gradleExamples/gradleExample0_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("gradleExample18_before.gradle")
|
||||
public void testGradleExample18() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/gradleExamples/gradleExample18_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("gradleExample22_before.gradle")
|
||||
public void testGradleExample22() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/gradleExamples/gradleExample22_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("gradleExample44_before.gradle")
|
||||
public void testGradleExample44() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/gradleExamples/gradleExample44_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("gradleExample5_before.gradle")
|
||||
public void testGradleExample5() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/gradleExamples/gradleExample5_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("gradleExample50_before.gradle")
|
||||
public void testGradleExample50() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/gradleExamples/gradleExample50_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("gradleExample58_before.gradle")
|
||||
public void testGradleExample58() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/gradleExamples/gradleExample58_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("gradleExample65_before.gradle")
|
||||
public void testGradleExample65() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/gradleExamples/gradleExample65_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("gradleExample8_before.gradle")
|
||||
public void testGradleExample8() throws Exception {
|
||||
doTestAndroidGradle("idea/testData/configuration/android-gradle/gradleExamples/gradleExample8_before.gradle");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static Test innerSuite() {
|
||||
TestSuite suite = new TestSuite("Android_gradle");
|
||||
suite.addTestSuite(Android_gradle.class);
|
||||
suite.addTestSuite(GradleExamples.class);
|
||||
return suite;
|
||||
}
|
||||
}
|
||||
|
||||
@TestMetadata("idea/testData/configuration/gradle")
|
||||
public static class Gradle extends AbstractConfigureGradleProjectTest {
|
||||
public void testAllFilesPresentInGradle() throws Exception {
|
||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), "org.jetbrains.jet.generators.tests.GenerateTests", new File("idea/testData/configuration/gradle"), Pattern.compile("(\\w+)_before\\.gradle$"), true);
|
||||
}
|
||||
|
||||
@TestMetadata("default_before.gradle")
|
||||
public void testDefault() throws Exception {
|
||||
doTestGradle("idea/testData/configuration/gradle/default_before.gradle");
|
||||
}
|
||||
|
||||
@TestMetadata("missedLibrary_before.gradle")
|
||||
public void testMissedLibrary() throws Exception {
|
||||
doTestGradle("idea/testData/configuration/gradle/missedLibrary_before.gradle");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static Test suite() {
|
||||
TestSuite suite = new TestSuite("ConfigureGradleProjectTestGenerated");
|
||||
suite.addTest(Android_gradle.innerSuite());
|
||||
suite.addTestSuite(Gradle.class);
|
||||
return suite;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user