This repository has been archived by the owner on Sep 6, 2024. It is now read-only.
forked from ftctechnh/ftc_app
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Former-commit-id: c354b2c9b1ab6483ff3246e38177bb59806d7be6 Former-commit-id: f4faf6f
- Loading branch information
Showing
2 changed files
with
78 additions
and
56 deletions.
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 |
---|---|---|
@@ -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' |
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,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') | ||
} |