Skip to content

Commit

Permalink
Merge pull request #12 from Pattonville-Robotics/android-maven-plugin…
Browse files Browse the repository at this point in the history
…-update

Android maven plugin update
  • Loading branch information
magneticflux- authored Oct 27, 2017
2 parents e357122 + 7687a30 commit 755bf71
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 21 deletions.
7 changes: 5 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
* It is extraordinarily rare that you will ever need to edit this file.
*/
buildscript {
ext.ftc_version = '3.4'

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
}
}

Expand Down
55 changes: 37 additions & 18 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'

group = 'com.github.Pattonville-Robotics'

android {

compileSdkVersion 26
buildToolsVersion '26.0.2'

signingConfigs {
debug {
Expand All @@ -36,8 +32,8 @@ android {
minSdkVersion 19
targetSdkVersion 26

versionName '3.4.1'
versionCode 5
versionName "$ftc_version.2"
versionCode 6
}

// Advanced user code might just want to use Vuforia directly, so we set up the libs as needed
Expand All @@ -47,12 +43,18 @@ android {
ndk {
abiFilters "armeabi-v7a"
}

//minifyEnabled true
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
ndk {
abiFilters "armeabi-v7a"
}

//minifyEnabled true
//proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

Expand All @@ -61,32 +63,40 @@ android {
targetCompatibility JavaVersion.VERSION_1_7
}

lintOptions {
abortOnError false //TODO actually ignore the exact lint checks that error
}

sourceSets.main {
jni.srcDirs = []
jniLibs.srcDir "../libs"
}
}

group = 'com.github.Pattonville-Robotics'
version = android.defaultConfig.versionName
project.archivesBaseName = 'Common-Code'

dependencies {
compile 'org.first.ftc:inspection:3.4'
compile 'org.first.ftc:blocks:3.4'
compile 'org.first.ftc:robotcore:3.4'
compile 'org.first.ftc:hardware:3.4'
compile 'org.first.ftc:ftc-common:3.4'
compile 'org.first.ftc:analytics:3.4'
compile 'org.first.ftc:wireless-p2p:3.4'
implementation "org.first.ftc:inspection:$ftc_version"
implementation "org.first.ftc:blocks:$ftc_version"
implementation "org.first.ftc:robotcore:$ftc_version"
implementation "org.first.ftc:hardware:$ftc_version"
implementation "org.first.ftc:ftc-common:$ftc_version"
implementation "org.first.ftc:analytics:$ftc_version"
implementation "org.first.ftc:wireless-p2p:$ftc_version"

// https://mvnrepository.com/artifact/org.apache.commons/commons-math3
compile group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'
implementation group: 'org.apache.commons', name: 'commons-math3', version: '3.6.1'

// https://mvnrepository.com/artifact/com.annimon/stream
compile group: 'com.annimon', name: 'stream', version: '1.1.8'
implementation group: 'com.annimon', name: 'stream', version: '1.1.8'

// https://mvnrepository.com/artifact/com.google.code.findbugs/jsr305
compile group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'
implementation group: 'com.google.code.findbugs', name: 'jsr305', version: '3.0.2'

// https://mvnrepository.com/artifact/com.google.guava/guava
compile group: 'com.google.guava', name: 'guava', version: '23.2-android'
implementation group: 'com.google.guava', name: 'guava', version: '23.2-android'
}

//For JitPack
Expand All @@ -98,7 +108,7 @@ task sourcesJar(type: Jar) {
}

task javadoc(type: Javadoc) {
failOnError false
failOnError false
source = android.sourceSets.main.java.sourceFiles
classpath += project.files(android.getBootClasspath().join(File.pathSeparator))
classpath += configurations.compile
Expand All @@ -114,3 +124,12 @@ artifacts {
archives sourcesJar
archives javadocJar
}
/*
android.libraryVariants.all { variant ->
def name = variant.buildType.name
def task = project.tasks.create "jar${name.capitalize()}", Jar
task.dependsOn variant.javaCompiler
task.from variant.javaCompiler.destinationDir
artifacts.add 'archives', task
}
*/
7 changes: 7 additions & 0 deletions library/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-verbose
-dontobfuscate

#Common Code
-keep,includedescriptorclasses class org.pattonvillerobotics.commoncode.** {
*;
}
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include ':library'
include ':library'

0 comments on commit 755bf71

Please sign in to comment.