Skip to content

Instantly share code, notes, and snippets.

@monry
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save monry/9cde12d834eee80a8431 to your computer and use it in GitHub Desktop.
Save monry/9cde12d834eee80a8431 to your computer and use it in GitHub Desktop.
Unity 4.6.1 対応版 build.gradle
task wrapper(type: Wrapper) {
gradleVersion = '2.1'
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
}
}
allprojects {
repositories {
mavenCentral()
maven { url 'file://' + new File(System.getProperty('user.home'), '.m2/repository').absolutePath }
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
signingConfigs {
staging {
storeFile file(project.properties.stagingStoreFile)
storePassword project.properties.stagingStorePassword
keyAlias project.properties.stagingKeyAlias
keyPassword project.properties.stagingKeyPassword
}
production {
storeFile file(project.properties.productionStoreFile)
storePassword project.properties.productionStorePassword
keyAlias project.properties.productionKeyAlias
keyPassword project.properties.productionKeyPassword
}
}
buildTypes {
staging {
debuggable true
zipAlignEnabled true
minifyEnabled false
signingConfig signingConfigs.staging
}
production {
debuggable false
zipAlignEnabled true
minifyEnabled false
// proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
signingConfig signingConfigs.production
}
}
sourceSets {
main {
manifest.srcFile 'ProjectName/AndroidManifest.xml'
java.srcDirs = ['ProjectName/src']
resources.srcDirs = ['ProjectName/src']
aidl.srcDirs = ['ProjectName/src']
renderscript.srcDirs = ['ProjectName/src']
res.srcDirs = ['ProjectName/res']
assets.srcDirs = ['ProjectName/assets']
jniLibs.srcDirs = ['ProjectName/libs']
}
}
dependencies {
compile fileTree(dir: 'ProjectName/libs', include: '*.jar')
compile 'com.unity3d:unity3d:4.6.1'
compile 'com.android.support:support-v4:21.0.3'
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment