Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
merge mentorsandbox -> master
Browse files Browse the repository at this point in the history
Former-commit-id: c354b2c9b1ab6483ff3246e38177bb59806d7be6
Former-commit-id: f4faf6f
  • Loading branch information
rgatkinson committed Feb 9, 2016
2 parents 9b52263 + a04d097 commit 0750e57
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 56 deletions.
57 changes: 1 addition & 56 deletions YourCodeHere/build.gradle
Original file line number Diff line number Diff line change
@@ -1,56 +1 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 19
buildToolsVersion "22.0.1"

defaultConfig {
applicationId 'com.qualcomm.ftcrobotcontroller'
minSdkVersion 16
targetSdkVersion 19

// Note: this versionCode must be kept in sync with the
// android:versionCode="nn"
// attribute that is found in the AndroidManifest.xml file of the FtcRobotController
// module from FTC HQ. If this is not done, the robot controller may potentially have
// multiple versions of the app simultaneously installed, which can lead to confusion.
//
// The versionName need not match; you can set that to what you may please.
//
// See also: http://developer.android.com/tools/building/configuring-gradle.html
//
versionCode 6 // http://developer.android.com/tools/publishing/versioning.html
versionName '@string/version_name' // http://developer.android.com/tools/publishing/versioning.html
}
buildTypes {
release {
debuggable true
}
debug {
debuggable true
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}

repositories {
flatDir {
dirs '../FtcRobotController/libs'
}
}

dependencies {
compile files('libs/android-support-v4.jar')
compile (name:'RobotCore-release', ext:'aar')
compile (name:'Hardware-release', ext:'aar')
compile (name:'FtcCommon-release', ext:'aar')
compile (name:'ModernRobotics-release', ext:'aar')
compile (name:'Analytics-release', ext:'aar')
compile (name:'WirelessP2p-release', ext:'aar')
compile project(':SwerveRoboticsLibrary')
compile project(':FtcRobotController')
}
apply from: '../build.common.gradle'
77 changes: 77 additions & 0 deletions build.common.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
//
// build.common.gradle
//
// This contains the content of the 'build.gradle' files for all YourCodeHere applications
// built using the Swerve Library. Each individual 'build.gradle' in those applications can
// simply contain the one line:
//
// apply from: '../build.common.gradle'
//
// That will pick up this file here. This approach allows the maintenance of individual
// build.gradle files to be carried out automatically on behalf of individual YourCodeHere
// applications.

import java.util.regex.Pattern

apply plugin: 'com.android.application'

android {
compileSdkVersion 19
buildToolsVersion "22.0.1"

defaultConfig {
applicationId 'com.qualcomm.ftcrobotcontroller'
minSdkVersion 16
targetSdkVersion 19

// Note: this versionCode must be kept in sync with the
// android:versionCode="nn"
// attribute that is found in the AndroidManifest.xml file of the FtcRobotController
// module from FTC HQ. If this is not done, the robot controller may potentially have
// multiple versions of the app simultaneously installed, which can lead to confusion.
//
// Here, we have a funky little Groovy script to maintain that correspondence automatically
// See also: http://developer.android.com/tools/building/configuring-gradle.html

def manifestFile = file('../FtcRobotController/src/main/AndroidManifest.xml');
def pattern = Pattern.compile("versionCode=\"(\\d+)\"")
def manifestText = manifestFile.getText()
def matcher = pattern.matcher(manifestText)
matcher.find()
def code = Integer.parseInt(matcher.group(1))

versionCode code // http://developer.android.com/tools/publishing/versioning.html
versionName '@string/version_name' // http://developer.android.com/tools/publishing/versioning.html
}
buildTypes {
release {
debuggable true
}
debug {
debuggable true
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}

repositories {
flatDir {
dirs '../FtcRobotController/libs'
}
}

dependencies {
compile files('libs/android-support-v4.jar')
compile (name:'RobotCore-release', ext:'aar')
compile (name:'Hardware-release', ext:'aar')
compile (name:'FtcCommon-release', ext:'aar')
compile (name:'ModernRobotics-release', ext:'aar')
compile (name:'Analytics-release', ext:'aar')
compile (name:'WirelessP2p-release', ext:'aar')
compile project(':SwerveRoboticsLibrary')
compile project(':FtcRobotController')
}

0 comments on commit 0750e57

Please sign in to comment.