Presentation is loading. Please wait.

Presentation is loading. Please wait.

Jonas Ragaišis Programų sistemų 2M kursas Vilnius, 2015

Similar presentations


Presentation on theme: "Jonas Ragaišis Programų sistemų 2M kursas Vilnius, 2015"— Presentation transcript:

1 Jonas Ragaišis Programų sistemų 2M kursas Vilnius, 2015
Gradle Jonas Ragaišis Programų sistemų 2M kursas Vilnius, 2015

2 Gradle open source build automation system
builds upon the concepts of Apache Ant and Apache Maven introduces a Groovy-based domain-specific language (DSL)

3 Why gradle? Designed for multi-project builds which can grow to be quite large Supports incremental builds Tracks version upgrades

4 Polyglot builds Linkedin uses Gradle to build 60 different programming languages

5 Tool integrations

6 Robust Dependency Management
Retrieve artifacts from any known binary repository, from public to private to local. Flat

7 High Performance Builds
Gradle avoids unnecessary workload by caching: remote metadata and artifacts transitive dependency resolution build execution plan plugin inputs and outputs test results

8 Packs all the gear to build enterprise software for the JVM
Test frameworks: JUnit, TestNG, Spock Application frameworks: Java EE, Grails, Play!, Code analysis cops: Checkstyle, CodeNarc, FindBugs, JDepend, PMD, JaCoCo, Sonar

9 Reliable incremental builds

10 Partial builds Gradle helps quickly accomplish the task by only building parts of the project

11 Efficient test execution
Filter tests by type, group or pattern Run a single test Rerun failed tests Fail fast (stop on first failure) Run tests in parallel Distribute tests across multiple runtimes or machines Skip tests when not needed

12 Gradle’s Daemon cuts startup time to near zero
enhances incremental builds reuses the execution plan between subsequent builds monitors changes to make builds reactive lets you move seamlessly between the IDE and command line performs preemptive work and maintenance tasks

13 From continuous integration to delivery
Get feedback sooner thanks to CI job caching and Gradle’s incremental build capabilities. Activate Gradle’s numerous reports to inspect build results, troubleshoot problems and monitor build performance. Use Gradle’s publishing tasks to turn the CI server into a publishing tool and release manager. Push artifacts to a binary repository, documentation to a web server or your app to a staging or production environment.

14 Android studio Automatic configuration of build variants and multiple APK file generation ProGuard obfuscation App-signing capabilities Vector drawables Project wizard for creating a Gradle-based project Command line and IDE compatibility

15 Repositories repositories { jcenter() mavenCentral()
maven { url ' } maven { url ' } }

16 Global parameters maven { credentials { username projectNexusUsername
password projectNexusPassword } url '

17 Android project configuration (1/x)
compileSdkVersion 23 buildToolsVersion "23.0.1" useLibrary 'org.apache.http.legacy' packagingOptions { exclude 'META-INF/LICENSE' exclude 'META-INF/NOTICE' exclude 'META-INF/services/javax.annotation.processing.Processor' }

18 Android project configuration (2/x)
dexOptions { incremental true javaMaxHeapSize "2048M" } lintOptions { checkReleaseBuilds false abortOnError false disable 'InvalidPackage'

19 Android project configuration (3/x)
defaultConfig { applicationId "lt.lemonlabs.android.mob.payment" minSdkVersion 14 targetSdkVersion 22 multiDexEnabled true resValue 'string', 'config_app_name', 'Wallet'

20 Android project configuration (4/x)
buildConfigField "String", "CARD_RELATION_URI", '"wallet://card/related"' buildConfigField "String", "API_BASE_URI", '" buildConfigField "String", "API_CLIENT_MAC_ID", '"AB14sAp3OwKSeCZk"' buildConfigField 'boolean', 'FEATURE_FLAG_SCAN_HISTORY', 'false' buildConfigField 'boolean', 'FEATURE_FLAG_PIN_LOCK', 'true'

21 Android project configuration (5/x)
signingConfigs { beta { storeFile file("keys/beta.keystore") storePassword "android" keyAlias "alias_name" keyPassword "android" }

22 Android project configuration (6/x)
productFlavors { prod { versionCode 34 versionName "1.1.25" buildConfigField "String", "NEWRELIC_KEY", '"AB8413efaesba5a3Fsd25"' resValue 'string', 'config_google_maps_api_key', 'AIZad23OTiX86iB74' }

23 Android project configuration (7/x)
sourceSets { main { jniLibs.srcDirs = ['libs'] java.srcDirs = ['src/main/java', 'src/main/java-gen', 'src/main/kotlin'] }

24 Android project configuration (8/x)
buildTypes { release { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' shrinkResources true productFlavors.beta.signingConfig signingConfigs.beta }

25 Android project configuration (9/x)
dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" compile 'com.android.support:support-v4:23.1.0' compile 'com.android.support:design:23.0.1' compile fileTree(dir: 'libs', include: ['*.jar']) { transitive = true }

26 Semantic Versioning v MAJOR version when you make incompatible API changes, MINOR version when you add functionality in a backwards-compatible manner, and PATCH version when you make backwards-compatible bug fixes.

27 Alternatives Rake (DSL + Ruby) Apache Buildr (DSL + Ruby)
Scons (DSL + Python) Simple Build Tool (DSL + Scala)

28 Off topic :) Dockercraft - simple Minecraft Docker client, to
visualize and manage Docker containers. You can start, stop and remove containers interacting with levers and buttons. Some Docker commands are also supported directly via Minecraft's chat window


Download ppt "Jonas Ragaišis Programų sistemų 2M kursas Vilnius, 2015"

Similar presentations


Ads by Google