Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Sürekli Entegrasyon (CI), geliştiricilerin kod değişikliklerini sıklıkla merkezi bir depoda birleştirdiği, ardından otomatik derlemeler ve testlerin çalıştırıldığı bir yazılım geliştirme uygulamasıdır.
Birleştirme sonrasında derlemeyi bozacak yeni değişiklikleri önlemek için temel bir CI sistemi kurabilirsiniz. Uygulamayı otomatik olarak test edip API seviyeleri, ekran boyutları ve platformlar gibi farklı ortamlarda beklendiği gibi çalıştığından emin olmak için daha gelişmiş bir CI sistemi programlayabilirsiniz.
Şekil 1. CI sistemi, birleştirme işleminden önce denetimler çalıştırarak kod deposunun iyi durumda kalmasını sağlar.
Bu belgede, geliştiricilerin Android projeleri için etkili CI sistemleri oluşturmak amacıyla kullandığı yaygın stratejiler gösterilmektedir. Bu yönergeler geneldir ve
çok sayıda çözüm için geçerlidir.
Tipik örnek
Tipik bir CI sistemi, aşağıdaki gibi bir iş akışını veya ardışık düzeni izler:
CI sistemi kodda bir değişiklik algılar. Bu genelde bir geliştirici "değişiklik listesi" veya "birleştirme isteği" olarak da adlandırılan bir pull isteği oluşturduğunda.
İş akışını çalıştırmak için bir sunucu hazırlar ve başlatır.
Kodun yanı sıra Android SDK'sı veya gerekirse emülatör görüntüleri gibi araçları da getirir.
Belirli bir komutu çalıştırarak projeyi oluşturur (örneğin, ./gradlew
build).
Belirli bir komutu çalıştırarak (örneğin, şu komutu çalıştırarak) yerel testleri çalıştırır:/gradlew test.
İyileştirilmiş yazılım kalitesi: CI, sorunları erkenden tespit edip düzelterek yazılım kalitesinin iyileştirilmesine yardımcı olabilir. Bu, yazılım sürümlerindeki hata sayısını azaltmaya ve genel kullanıcı deneyimini iyileştirmeye yardımcı olabilir.
Bozuk derleme riski daha az: Derleme işleminizi CI ile otomatikleştirdiğinizde sorunları sürecin erken bir aşamasında çözerek bozuk derlemelerden daha iyi kaçınabilirsiniz.
Sürümlere daha fazla güven: CI, her sürümün kararlı ve üretime hazır olmasını sağlamaya yardımcı olabilir. CI, otomatik testler çalıştırarak olası sorunları genel kullanıma sunmadan önce tespit edebilir.
Daha iyi iletişim ve ortak çalışma: CI, geliştiricilerin kod ve test sonuçlarını paylaşabilecekleri merkezi bir yer sağlayarak, geliştiricilerin ve diğer ekip üyelerinin birlikte çalışmasını ve ilerlemeyi izlemesini kolaylaştırabilir.
Üretkenliği artırma: CI, aksi halde zaman alıcı ve hataya yatkın görevleri otomatikleştirerek geliştiricilerin üretkenliğini artırmaya yardımcı olabilir.
Daha fazla bilgi
Uygulamanızın geliştirme sürecini iyileştirmek için sürekli entegrasyonu nasıl kullanabileceğinizle ilgili daha fazla bilgi edinmek için aşağıdaki sayfaları okuyun:
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-27 UTC."],[],[],null,["# Continuous Integration basics\n\nContinuous Integration (CI) is a software development practice where developers\nfrequently merge their code changes into a central repository, after which\nautomated builds and tests run.\n\nYou can set up a basic CI system to prevent new changes that would break the\nbuild after merging in. You can program a more advanced CI system to\nautomatically test the app and make sure it behaves as expected in different\nenvironments, such as API levels, screen sizes, and platforms.\n**Figure 1.** A CI system keeps a code repository healthy by running checks before merging.\n\nThis document demonstrates common strategies developers use to set up effective\nCI systems for Android projects. These guidelines are generic and apply to the\nmajority of solutions.\n\nTypical example\n---------------\n\nA typical CI system follows a *workflow* or *pipeline*, which might look as\nfollows:\n\n1. The CI system detects a change in the code, usually when a developer creates a pull request, also called \"change list\" or \"merge request\".\n2. It provisions and initializes a server to run the workflow.\n3. It fetches the code as well as tools such as the Android SDK or emulator images if needed.\n4. It builds the project by running a given command, for example .`/gradlew\n build`.\n5. It runs the [local tests](/training/testing/local-tests) by running a given command, for example running .`/gradlew test`.\n6. It starts emulators and runs the [instrumented tests](/training/testing/instrumented-tests).\n7. It uploads artifacts such as test results and APKs.\n\n**Figure 2.** A basic CI workflow\n\nBenefits of CI\n--------------\n\nThe advantages of CI include:\n\n- **Improved quality of software**: CI can help to improve the quality of software by identifying and fixing problems early on. This can help to reduce the number of bugs in software releases and improve the overall user experience.\n- **Reduced risk of broken builds**: When you automate your build process with CI you can better avoid broken builds by resolving issues earlier in the process.\n- **Increased confidence in releases**: CI can help to ensure that each release is stable and ready for production. By running automated tests, CI can identify any potential problems before you release them to the public.\n- **Improved communication and collaboration**: By providing a central place for developers to share code and test results, CI can help to make it easier for developers and other team members to work together and track progress.\n- **Increased productivity**: CI can help to increase developer productivity by automating tasks that would otherwise be time-consuming and error-prone.\n\nFurther reading\n---------------\n\nMore more information on how you can use constant integration to improve\ndevelopment for your app, read the following pages:\n\n- **[CI Automation](/training/testing/continuous-integration/automation)**\n\n- **[CI Features](/training/testing/continuous-integration/features)**"]]