The document discusses managing dependencies in Gradle multi-module projects. It presents three problems: 1) managing shared dependencies across modules, 2) changing dependencies that impact repeatable builds, and 3) dependency conflicts when modules are updated separately. For problem 1, it recommends using a gradle.properties file to define shared versions. For problem 2, it introduces the nebula-dependency-lock plugin to lock dependencies until explicitly updated. For problem 3, it notes conflicts can occur if modules are updated independently and provides solutions like dependency locking or pinning versions.
One of the biggest advantages of Git is its branching capabilities. Unlike centralized version control systems, Git branches are cheap and easy to merge. This facilitates the feature branch workflow popular with many Git users.
Introduction to Git & GitHub.
Agenda:
- What’s a Version Control System?
- What the heck is Git?
- Some Git commands
- What’s about GitHub?
- Git in Action!
One of the biggest advantages of Git is its branching capabilities. Unlike centralized version control systems, Git branches are cheap and easy to merge. This facilitates the feature branch workflow popular with many Git users.
Introduction to Git & GitHub.
Agenda:
- What’s a Version Control System?
- What the heck is Git?
- Some Git commands
- What’s about GitHub?
- Git in Action!
본 장표는 인프콘 2022 / 코틀린 멀티플랫폼, 미지와의 조우 세션에 대한 강연 자료입니다.
코틀린은 멀티플랫폼을 지원하는 언어로 Server-side와 Android뿐만이 아니라 JavaScript 엔진이 있는 브라우저나 Node.js도 지원하며, Native 등 다양한 플랫폼에서 쓸 수 있습니다. 이를 이용해 코틀린 코드를 공유하는 단일 코드베이스로 모바일부터 웹과 데스크톱, 서버에 이르기까지 다중 플랫폼 애플리케이션을 작성할 수 있습니다.
본 핸즈온 세션을 통해 코틀린 멀티플랫폼과 함께 리액트, 스프링부트로 웹 애플리케이션의 프론트엔드부터 백엔드까지 직접 개발하며 친해져 보는 시간을 가져보세요. 참가자는 코틀린 멀티플랫폼 프로젝트를 이해하고, 더 나아가 프론트엔드와 백엔드 간의 공유 로직 작성, Kotlin/JS 기반 리액트 및 스프링 웹 프로그래밍을 경험할 수 있습니다.
https://github.com/arawn/building-fullstack-webapp-with-kotlin-multiplatform
https://infcon.day/speaker/박용권-김지헌-코틀린-멀티플랫폼/
Introduction to Gitlab | Gitlab 101 | Training SessionAnwarul Islam
I actually described in this slide how to use Gitlab with git. I explained what is git, push, pull, clone, commit etc. so, you can use this slide to learn or tech someone.
This slide discusses the most popular distributed version control system that is GIT and it's different commands that we need in our daily operations for project collaboration.
GitHub is a Git repository hosting service, but it adds many of its own features. While Git is a command line tool, GitHub provides a Web-based graphical interface. It also provides access control and several collaboration features, such as a wikis and basic task management tools for every project.
Evolving a Clean, Pragmatic Architecture - A Craftsman's GuideVictor Rentea
Talk given at Devoxx Belgium 2019.
===== Abstract =====
Are you in a mood for a brainstorm? Join this critical review of the major decisions taken in a typical enterprise application architecture and learn to balance pragmatism with your design goals. Find out how to do just-in-time design to keep as many use-cases as simple as possible.
The core purpose of this presentation is to learn to strike a **balance between pragmatism and maintainability** in your design. Without continuous refactoring, a simple design will inevitably degenerate into a Big Ball of Mud, under the assault of the new features and bugfixes.
On the other hand, the very highly-factored code can burden the take-off of the development and end up freezing the mindset in some rigid upfront design.
The end goal of this talk is to challenge you to rethink critically the architecture of your systems and seek ways to simplify it to match your actual needs, with a pragmatic mindset. "Architecture is the art of postponing decisions", said Uncle Bob.
This talk takes this idea further and explains an optimal mindset about designing enterprise applications: Evolving (Continuously Refactoring) a Pragmatic (Simple), Clean (aka Onion) Architecture, aiming to provide Developer Safety™️ and Comfort™️.
It’s the philosophy that Victor distilled over the past 5 years, designing and implementing 9 applications as IBM Lead Architect, and delivering training and advises to many other companies.
You’ll learn how to break data into pieces (Fit Entities, Value Objects, Data Transfer Objects), how to keep the logic simple (Facades, Domain Services, logic extraction patterns, Mappers, AOP), layering to enforce boundaries (keeping DTOs out of your logic, Dependency Inversion Principle), and many more, all in a dynamic, interactive and extremely entertaining session.
Slides for my deep dive session at Devoxx Belgium 2019.
Main concepts:
OOP, Functional Programming, Functions, Feature Envy, Design, Refactoring, Extract Method, Signatures, side effects, pure functions, programming paradigms, emotions
Abstract:
Would you attach your last commit to your CV:
"Sample: how I write code"?
What do others think of your code?
Writing Clean Code: an old topic, but never less important, nor challenging than today!
During the first part of this deep-dive session, we will go through the essential clean code rules, learning to detect code smells, discussing refactoring ideas and alternative designs pros/cons.
Then, after the break, we will apply what we learned in a refactoring live-coding kata, explaining 10 key practical techniques you can immediately apply in your code. By the end of the session, you will have a clear picture of what clean code means and quite a variety of ways at hand to get there.
Along the way, we will also point out the differences between procedural/oop/functional paradigms and whether they are competing or complementary, speak in detail about Extract Method, statefulness, separation by layers of abstractions, OOP, and many more.
Can't wait to share my greatest passion with you: writing professional, expressive code that is a pleasure to work with.
Netflix has open sourced many of our Gradle plugins under the name Nebula. These plugins are there to lend our expertise and experience to building responsible projects, internally and externally. This talk will cover some of the ones we've published, why we want to share these with the community, how we tested and published them, and most importantly how you can contribute back to them.
Nebula started off as a set of strong opinions to make Gradle simple to use for our developers. But we quickly learned that we could use the same assumptions on our open source projects and on other Gradle plugins to make them easy to build, test and deploy. By standardizing plugin development, we've lowered the barrier to generating them, allowing us to keep our build modular and composable.
본 장표는 인프콘 2022 / 코틀린 멀티플랫폼, 미지와의 조우 세션에 대한 강연 자료입니다.
코틀린은 멀티플랫폼을 지원하는 언어로 Server-side와 Android뿐만이 아니라 JavaScript 엔진이 있는 브라우저나 Node.js도 지원하며, Native 등 다양한 플랫폼에서 쓸 수 있습니다. 이를 이용해 코틀린 코드를 공유하는 단일 코드베이스로 모바일부터 웹과 데스크톱, 서버에 이르기까지 다중 플랫폼 애플리케이션을 작성할 수 있습니다.
본 핸즈온 세션을 통해 코틀린 멀티플랫폼과 함께 리액트, 스프링부트로 웹 애플리케이션의 프론트엔드부터 백엔드까지 직접 개발하며 친해져 보는 시간을 가져보세요. 참가자는 코틀린 멀티플랫폼 프로젝트를 이해하고, 더 나아가 프론트엔드와 백엔드 간의 공유 로직 작성, Kotlin/JS 기반 리액트 및 스프링 웹 프로그래밍을 경험할 수 있습니다.
https://github.com/arawn/building-fullstack-webapp-with-kotlin-multiplatform
https://infcon.day/speaker/박용권-김지헌-코틀린-멀티플랫폼/
Introduction to Gitlab | Gitlab 101 | Training SessionAnwarul Islam
I actually described in this slide how to use Gitlab with git. I explained what is git, push, pull, clone, commit etc. so, you can use this slide to learn or tech someone.
This slide discusses the most popular distributed version control system that is GIT and it's different commands that we need in our daily operations for project collaboration.
GitHub is a Git repository hosting service, but it adds many of its own features. While Git is a command line tool, GitHub provides a Web-based graphical interface. It also provides access control and several collaboration features, such as a wikis and basic task management tools for every project.
Evolving a Clean, Pragmatic Architecture - A Craftsman's GuideVictor Rentea
Talk given at Devoxx Belgium 2019.
===== Abstract =====
Are you in a mood for a brainstorm? Join this critical review of the major decisions taken in a typical enterprise application architecture and learn to balance pragmatism with your design goals. Find out how to do just-in-time design to keep as many use-cases as simple as possible.
The core purpose of this presentation is to learn to strike a **balance between pragmatism and maintainability** in your design. Without continuous refactoring, a simple design will inevitably degenerate into a Big Ball of Mud, under the assault of the new features and bugfixes.
On the other hand, the very highly-factored code can burden the take-off of the development and end up freezing the mindset in some rigid upfront design.
The end goal of this talk is to challenge you to rethink critically the architecture of your systems and seek ways to simplify it to match your actual needs, with a pragmatic mindset. "Architecture is the art of postponing decisions", said Uncle Bob.
This talk takes this idea further and explains an optimal mindset about designing enterprise applications: Evolving (Continuously Refactoring) a Pragmatic (Simple), Clean (aka Onion) Architecture, aiming to provide Developer Safety™️ and Comfort™️.
It’s the philosophy that Victor distilled over the past 5 years, designing and implementing 9 applications as IBM Lead Architect, and delivering training and advises to many other companies.
You’ll learn how to break data into pieces (Fit Entities, Value Objects, Data Transfer Objects), how to keep the logic simple (Facades, Domain Services, logic extraction patterns, Mappers, AOP), layering to enforce boundaries (keeping DTOs out of your logic, Dependency Inversion Principle), and many more, all in a dynamic, interactive and extremely entertaining session.
Slides for my deep dive session at Devoxx Belgium 2019.
Main concepts:
OOP, Functional Programming, Functions, Feature Envy, Design, Refactoring, Extract Method, Signatures, side effects, pure functions, programming paradigms, emotions
Abstract:
Would you attach your last commit to your CV:
"Sample: how I write code"?
What do others think of your code?
Writing Clean Code: an old topic, but never less important, nor challenging than today!
During the first part of this deep-dive session, we will go through the essential clean code rules, learning to detect code smells, discussing refactoring ideas and alternative designs pros/cons.
Then, after the break, we will apply what we learned in a refactoring live-coding kata, explaining 10 key practical techniques you can immediately apply in your code. By the end of the session, you will have a clear picture of what clean code means and quite a variety of ways at hand to get there.
Along the way, we will also point out the differences between procedural/oop/functional paradigms and whether they are competing or complementary, speak in detail about Extract Method, statefulness, separation by layers of abstractions, OOP, and many more.
Can't wait to share my greatest passion with you: writing professional, expressive code that is a pleasure to work with.
Netflix has open sourced many of our Gradle plugins under the name Nebula. These plugins are there to lend our expertise and experience to building responsible projects, internally and externally. This talk will cover some of the ones we've published, why we want to share these with the community, how we tested and published them, and most importantly how you can contribute back to them.
Nebula started off as a set of strong opinions to make Gradle simple to use for our developers. But we quickly learned that we could use the same assumptions on our open source projects and on other Gradle plugins to make them easy to build, test and deploy. By standardizing plugin development, we've lowered the barrier to generating them, allowing us to keep our build modular and composable.
The phase-1 project, only around 3,200 km of the 5,477-km sanctioned stretch had been completed in 34 Naxal-affected districts. In 2009, this was done during the UPA-led Congress regime. The deadline stipulated for the phase-1 is March 2015.During the second phase of the project, 7,294 km of road and 48 new bridges will be built in eight states. The total cost of phase-2 is estimated around Rs 10,700 crore.
“LA COMUNICACIÓN Y LA COLABORACIÓN DEL ADULTO EN EL DESARROLLO DE LA ACTIVIDAD COGNOSCITIVA EN LA EDAD TEMPRANA.” (Enfoque Histórico-Cultural / A. Zaporozhets)
Managing JavaScript projects in a MonoRepo
(Zacky Pickholz)
Managing a large front end project with multiple npm packages can be overwhelming sometimes. During this session we cover popular tools that help us maintain this project much more easily.
Efficient development workflows with composernuppla
Composer is a great tool for managing a project's dependencies - however, as with many tools there are various ways to use it. That's why this session will provide you an overview of possible workflows and shows practical solutions for building and deploying composer-managed projects. It covers experiences with handling Drupal projects and focus on approaches that can be shared across projects and team members.
Topics:
- Introduction: What is composer and how to use it with Drupal
- Build & deployment workflows for composer-managed projects
- Composer & Drupal: Challenges & solutions
- Creating re-usable packages
Gradle is an open source build automation system that builds upon the concepts of Apache Ant and Apache Maven and introduces a Groovy-based domain-specific language (DSL) instead of the XML form used by Apache Maven for declaring the project configuration.
Git is a distributed version-control system for tracking changes in source code during software development.
GitFlow is a branching model for Git which is very well suited to collaboration and scaling the development team.
Faster java ee builds with gradle [con4921]Ryan Cuprak
JavaOne 2016
It is time to move your Java EE builds over to Gradle! Gradle continues to gain momentum across the industry. In fact, Google is now pushing Gradle for Android development. Gradle draws on lessons learned from both Ant and Maven and is the next evolutionary step in Java build tools. This session covers the basics of switching existing Java EE projects (that use Maven) over to Gradle and the benefits you will reap, such as incremental compiling, custom distributions, and task parallelization. You’ll see demos of all the goodies you’ve come to expect, such as integration testing and leveraging of Docker. Switching is easier than you think, and no refactoring is required.
Automated Snap Package build processes without the Build ServiceDani Llewellyn
An exploration of my OCI images containing snapcraft, snapd, and systemd.
I will show how developers or proprietary apps can use the images within their own CI pipelines such as GitHub Actions and GitLab CI to automate their Snap Package build processes without requiring public disclosure of their source code, which using the snapcraft.io Build Service would necessitate.
I will also detail how they can be used in a comparable way by open-source projects to allow more fine-grained build customisation than the snapcraft.io Build Service allows. Such customisations include building and releasing pre-release Snaps without interfering with the stable release builds and without using the launchpad.net git-mirror-based workarounds.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
Quarkus Hidden and Forbidden ExtensionsMax Andersen
Quarkus has a vast extension ecosystem and is known for its subsonic and subatomic feature set. Some of these features are not as well known, and some extensions are less talked about, but that does not make them less interesting - quite the opposite.
Come join this talk to see some tips and tricks for using Quarkus and some of the lesser known features, extensions and development techniques.
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfJay Das
With the advent of artificial intelligence or AI tools, project management processes are undergoing a transformative shift. By using tools like ChatGPT, and Bard organizations can empower their leaders and managers to plan, execute, and monitor projects more effectively.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
The European Union Agency for Law Enforcement Cooperation (Europol) has suffered an alleged data breach after a notorious threat actor claimed to have exfiltrated data from its systems. Infamous data leaker IntelBroker posted on the even more infamous BreachForums hacking forum, saying that Europol suffered a data breach this month.
The alleged breach affected Europol agencies CCSE, EC3, Europol Platform for Experts, Law Enforcement Forum, and SIRIUS. Infiltration of these entities can disrupt ongoing investigations and compromise sensitive intelligence shared among international law enforcement agencies.
However, this is neither the first nor the last activity of IntekBroker. We have compiled for you what happened in the last few days. To track such hacker activities on dark web sources like hacker forums, private Telegram channels, and other hidden platforms where cyber threats often originate, you can check SOCRadar’s Dark Web News.
Stay Informed on Threat Actors’ Activity on the Dark Web with SOCRadar!
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
A Comprehensive Look at Generative AI in Retail App Testing.pdfkalichargn70th171
Traditional software testing methods are being challenged in retail, where customer expectations and technological advancements continually shape the landscape. Enter generative AI—a transformative subset of artificial intelligence technologies poised to revolutionize software testing.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
2. Problem 1
● Managing dependencies in multi-module projects
TOP LEVEL
build.gradle
settings.gradle
Module A
build.gradle:
compile “netflix.platform:1.2”
Module B
build.gradle:
compile “netflix.platform:?”
3. Problem 1 -- cont’d
● Managing dependencies in multi-module projects
TOP LEVEL
build.gradle
settings.gradle
Module A
build.gradle:
compile “netflix.platform:1.2”
Module B
build.gradle:
compile “netflix.platform:1.2”
4. Problem 1 -- cont’d
● To update platform version to 2.3:
TOP LEVEL
build.gradle
settings.gradle
Module A
build.gradle:
compile “netflix.platform:2.3”
Module B
build.gradle:
compile “netflix.platform:2.3”
● Result: 2 edits …. or N edits!
5. Problem 1 -- Solution
● Use gradle.properties
TOP LEVEL
build.gradle
settings.gradle
gradle.properties
6. Problem 1 -- Solution -- cont’d
● What is it?
○ Normal Java properties file -- used to store module versions (amongst others):
gradle.properties
…
platformVersion=1.2
libraryXVersion=latest.release
...
● The values from the properties file can be referenced in build.gradle file:
build.gradle
…
compile “netflix:platform: $platformVersion”
compile “some:library: $libraryXVersion”
...
● Use the groovy string “ (double quotes not single)
7. Problem 1 -- Solution -- cont’d
● The versions can be referenced in all build.gradle files!
TOP LEVEL
build.gradle
settings.gradle
gradle.properties
Module A
build.gradle:
compile “netflix.platform:$platformVersion”
Module B
build.gradle:
compile “netflix.platform:$platformVersion”
…
platformVersion=1.2
libraryXVersion=latest.release
...
● One centralized place to change version numbers.
9. Problem 2 -- cont’d
Day 1
platform.versions
● 1.1
● 1.2
latest.release -> 1.2
Build includes platform-1.2
10. Problem 2 -- cont’d
Day 1
platform.versions
● 1.1
● 1.2
latest.release -> 1.2
Day 2
platform.versions
● 1.1
● 1.2
● 1.3
latest.release -> 1.3
Build includes platform-1.3
11. Problem 2 -- cont’d
Day 1
platform.versions
● 1.1
● 1.2
latest.release -> 1.2
Day 2
platform.versions
● 1.1
● 1.2
● 1.3
latest.release -> 1.3
Day 3
platform.versions
● 1.1
● 1.2
● 1.3
● 2.0 (breaks binary compatibility)
latest.release -> 2.0
Build includes platform-2.0 (and fails!)
12. Problem 2 -- One Solution
● Pin version down
// build.gradle snippet
...
compile “netflix:platform:1.2”
…
13. Problem 2 -- One Solution -- cont’d
● Pin version down
// build.gradle snippet
...
compile “netflix:platform:1.2”
…
Problem: Have to manually update versions now every time there is a new
release. (Tedious and error-prone.)
14. Problem 2 -- nebula-dependency-lock Gradle Plugin
● Part of the Nebula gradle plugins family: https://github.com/nebula-
plugins/gradle-dependency-lock-plugin
A plugin to allow people using dynamic dependency versions to lock
them to specific versions.
● We can still use “latest.release” as the version number, but decide when the
version gets incremented, regardless of the versions of the components
available in the repository
15. ● How?
● Creates a (JSON) “lock” file in the project directory with the current version
numbers.
● Lock file does NOT get updated during the normal build process -- so
versions are “locked” until the lock file is updated
● Provides Gradle tasks to update the lock file
● Committing the “lock” file into SCM (git/stash/etc) means building from the
commit (hash) at any time will use the same versions always
nebula-dependency-lock Gradle Plugin -- Cont’d
16. ● Usage: simply reference the plugin in the build.gradle:
apply plugin: 'nebula.dependency-lock'
● Create a lock file:
gradle generateLock saveLock
Or (for multi-module projects)
gradle generateGlobalLock saveGlobalLock
(in root project)
nebula-dependency-lock Gradle Plugin -- Cont’d
17. ● To update dependency graph (i.e. when new library gets added to
dependencies) -- but not update the versions!
gradle updateLock saveLock
Or
gradle updateGlobalLock saveGlobalLock
● In fact generateLock/updateLock and
generateGlobalLock/updateGlobalLock are equivalent so they can be
interchanged
○ Same command can be used in both cases
nebula-dependency-lock Gradle Plugin -- Cont’d
18. ● To update versions
gradle updateLock saveLock --refresh-dependencies
Or
gradle updateGlobalLock saveGlobalLock --refresh-
dependencies
nebula-dependency-lock Gradle Plugin -- Cont’d
19. ● More goodness: plugging in nebula gradle-scm-plugins
● What is it
○ Suite of Nebula plugins for interfacing with SCM (git/stash/etc)
○ On Github: https://github.com/nebula-plugins/gradle-scm-plugin
● Specialized plugins for each SCM
○ gradle-git-scm-plugin is the plugin for Stash/Git
○ On Github: https://github.com/nebula-plugins/gradle-git-scm-plugin
● Creates tasks for committing from build.gradle into Stash/Git
nebula-dependency-lock Gradle Plugin -- Cont’d
20. ● When used in the same project with nebula-dependency-lock, a commitLock
task is created:
○ Commits the dependency “lock” file into SCM
○ For git/stash it does a commit + push (sync local/remote repos)
● Following updates the lock file and pushes it to the remote repository:
gradle updateLock saveLock commitLock --refresh-dependencies
Or
gradle updateGlobalLock saveGlobalLock commitLock --refresh-
dependencies
(Note the name of task is commitLock for both types of projects!)
nebula-dependency-lock Gradle Plugin -- Cont’d
21. Automatic nightly checked dependencies version upgrade:
● Everyone commits into master (assume we commit just code -- not update
dependencies too)
● Nightly, Jenkins job to:
a. gradle updateLock saveLock
b. gradle build test integrationTest
c. gradle commitLock
● Every morning the lock file will contain the latest versions which don’t break
the project!
■ Or if one of the new versions causes issues then you get notified by Jenkins!
nebula-dependency-lock Gradle Plugin -- Cont’d
22. ● Multi-module or separate modules?
Problem 3
Module A Module B
libX:1.0
libY:2.0
libZ:3.0
Module A:
latest
libX:1.0
libY:2.0
TOP LEVEL
Module A
libX:1.0
libY:2.0
Module B
libZ:3.0
Module A
23. Problem 3 -- cont’d
Module A Module B
libX:1.0
libY:2.0
libZ:3.0
Module A:
latest
libX:1.0
libY:2.0
TOP LEVEL
Module A
libX:1.0
libY:2.0
Module B
libZ:3.0
Module A
Own Repo
Own Jenkins Job
Own Repo
Own Jenkins Job
One Repo
One Jenkins Job
24. Problem 3 -- cont’d
Module A Module B
libX:1.0
libY:latest
libZ:3.0
Module A:
latest
libX:1.0
libY:2.0
● Dependencies Update -- separate modules
libY:
● 2.0
● 2.1
libY:2.1
Artifactory
Module A: 1.1
25. Problem 3 -- cont’d
Module A Module B
libX:1.0
libY:latest
libZ:3.0
Module A:
1.1
libX:1.0
libY:2.1
● Dependencies Update -- separate modules
libY:
● 2.0
● 2.1
libY:2.1
Artifactory
Module A: 1.1
26. Problem 3 -- cont’d
Module A Module B
libX:1.0
libY:latest
libZ:3.0
Module A:
1.1
libX:1.0
libY:2.1
● Dependencies Update -- separate modules
libY:
● 2.0
● 2.1
libY:2.1
Artifactory
Module A: 1.1
CONFLICT!
(Only visible when
Module B gets
compiled)
27. Problem 3 -- cont’d
Solutions for conflict (separate modules):
● Go back to Module A and pin libY to version to 2.0
○ Requires changes in A + rebuild A
● Change Module B and force pin libY to version 2.0
○ Simply pin to 2.0 won’t work because Module A drags a new version (2.1)
○ Now Module A and B use different versions of libY (so any project using both of them will have
to force pin libY)
● Change Module B to exclude libY when pulling Module A
○ Will use whatever version Module B has for libY
○ Again, Module A and B use different versions
29. Problem 3 -- cont’d
Module B
libZ:3.0
Module A:
latest
libX:1.0
libY:latest
● Dependencies Update -- multi-modules
libY:
● 2.0
● 2.1
Artifactory
libY:2.1
CONFLICT!
(Visible right away)
30. Problem 3 -- cont’d
Solutions for conflict (multi-module):
● Pin libY to version to 2.0
○ Requires one single change (in gradle.properties)
● Use dependency locking
○ The nightly build “catches” the incompatibility with 2.1 and doesn’t upgrade dependencies