সোর্স থেকে জাভার জন্য ক্লায়েন্ট লাইব্রেরি তৈরি করা
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
আমরা মাভেনের মাধ্যমে ক্লায়েন্ট লাইব্রেরি ব্যবহার করার পরামর্শ দিই। আমরা আমাদের রিলিজ পৃষ্ঠায় এবং মাভেন কেন্দ্রীয় সংগ্রহস্থলের মাধ্যমে বাইনারি বিতরণও প্রদান করি (বিশদ বিবরণের জন্য আমাদের দ্রুত শুরু নির্দেশিকা দেখুন)। যাইহোক, আপনি বর্ণিত বিল্ড প্রক্রিয়া ব্যবহার করে নিজেই লাইব্রেরি তৈরি করতে পারেন।
ক্লায়েন্ট লাইব্রেরি Gradle দিয়ে তৈরি করা হয়েছে। নির্ভরতাগুলি Maven কেন্দ্রীয় সংগ্রহস্থল থেকে ডাউনলোড করা হয়।
জাভা ডেভেলপমেন্ট কিট ইনস্টল করুন
লাইব্রেরি তৈরি করতে JDK 1.8 বা তার পরে প্রয়োজন। আমরা ধরে নেব যে জাভা এই গাইডের উদ্দেশ্যে আপনার মেশিনে ইনস্টল করা আছে।
Gradle দিয়ে তৈরি করুন
আমরা অন্তর্ভুক্ত গ্রেডল র্যাপার ব্যবহার করার পরামর্শ দিই। বর্তমান সংস্করণের জন্য gradle/wrapper/gradle-wrapper.properties দেখুন। আপনার আলাদা গ্রেডল ইনস্টলেশনের প্রয়োজন নেই।
লাইব্রেরি এবং উদাহরণ প্রকল্পের স্ন্যাপশট সংস্করণ তৈরি করতে নিম্নলিখিত কমান্ডটি চালান।
./gradlewbuild
একটি স্থানীয় মাভেন সংগ্রহস্থলে ক্লায়েন্ট লাইব্রেরি রপ্তানি করুন।
./gradlewpublishToMavenLocal
স্থানীয় মাভেন সংগ্রহস্থলে ক্লায়েন্ট লাইব্রেরি ব্যবহার করুন
একটি সফল নির্মাণ এবং রপ্তানির পরে, ক্লায়েন্ট লাইব্রেরির শিল্পকর্মগুলি স্থানীয় সংগ্রহস্থল থেকে Maven/Gradle-এর কাছে উপলব্ধ হয় (সাধারণত ~/.m2/repository/com/google/api-ads/google-ads/ )। স্ন্যাপশট সংস্করণের উপর একটি নির্ভরতা যোগ করুন যা পরবর্তী যেকোন প্রজেক্ট বিল্ড ফাইলে তৈরি করা হয়েছে। সংস্করণটি gradle.properties এ সংজ্ঞায়িত করা হয়েছে।
[null,null,["2025-08-26 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["\u003cp\u003eThe Google Ads client library is best used through Maven, with binary distributions also available.\u003c/p\u003e\n"],["\u003cp\u003eBuilding the library requires JDK 1.8 or later and is accomplished using the included Gradle wrapper.\u003c/p\u003e\n"],["\u003cp\u003eAfter building, the library can be exported to a local Maven repository for use in other projects.\u003c/p\u003e\n"],["\u003cp\u003eThe library is built from the google-ads-java Github repository and can be used in Maven or Gradle projects.\u003c/p\u003e\n"]]],[],null,["# Building the client library for Java from source\n\nWe recommend using the client library through Maven. We also provide binary\ndistributions on our releases page and through the [Maven central\nrepository](//search.maven.org/artifact/com.google.api-ads/google-ads)\n(see our [quick start](/google-ads/api/docs/client-libs/java/quick-start) guide for details). However, you can build\nthe library yourself using the following build process described.\n\nThe client library is built with Gradle. Dependencies are downloaded from the\nMaven Central repository.\n| **Note:** If you build the library from source, ensure that you enable annotation processing in your IDE.\n\nInstall Java development kit\n----------------------------\n\nJDK 1.8 or later is required to build the library. We'll assume that Java is\ninstalled on your machine for the purposes of this guide.\n\nBuild with Gradle\n-----------------\n\nWe recommend using the included Gradle wrapper. See\n[`gradle/wrapper/gradle-wrapper.properties`](https://github.com/googleads/google-ads-java/blob/HEAD/gradle.properties)\nfor the current version. You do not need a separate Gradle installation.\n\n### Build the library\n\n1. Clone this project in the directory of your choice. The `.git` suffix in the\n URL is optional.\n\n git clone https://github.com/googleads/google-ads-java.git\n\n2. Navigate to the `google-ads-java` directory.\n\n cd google-ads-java\n\n3. Run the following command to build the snapshot version of the library\n and examples project.\n\n ./gradlew build\n\n | **Note:** On Windows, use `gradlew` instead of `./gradlew`.\n4. Export the client library to a local Maven repository.\n\n ./gradlew publishToMavenLocal\n\n | **Note:** You can export the library to a local repository even if you have not used or installed Maven previously. Directories are created as needed.\n\nUse the client library in a local Maven repository\n--------------------------------------------------\n\nAfter a successful build and export, the artifacts for the client library are\navailable to Maven/Gradle from the local repository (typically\n`~/.m2/repository/com/google/api-ads/google-ads/`). Add a dependency on the\nSNAPSHOT version that was just built to any subsequent project build files. The\nversion is defined in\n[gradle.properties](https://github.com/googleads/google-ads-java/blob/main/gradle.properties)."]]