প্রকাশনার জন্য পরীক্ষার ফিক্সচার কনফিগার করুন
সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
যদিও পরীক্ষার ফিক্সচার প্রকাশের জন্য প্রকাশনার কোনো নির্দিষ্ট কনফিগারেশনের প্রয়োজন হয় না, ফিক্সচারগুলি পরিচালনা করার জন্য ব্যবহৃত ক্ষমতা পদ্ধতির জন্য একটি অতিরিক্ত কনফিগারেশনের প্রয়োজন হয়।
স্থানাঙ্ক groupId:artifactId:version
সহ একটি প্রদত্ত আর্টিফ্যাক্টের জন্য, Gradle আশা করে যে পরীক্ষার ফিক্সচার আর্টিফ্যাক্ট স্থানাঙ্ক groupId:artifactId-test-fixtures:version
সহ একটি ক্ষমতা ঘোষণা করে। এটি বর্তমানে স্বয়ংক্রিয়ভাবে টেস্ট ফিক্সচার সমর্থন বা Maven পাবলিশ প্লাগইন দ্বারা সম্পন্ন হয় না, এবং তাই ম্যানুয়ালি করা আবশ্যক।
Gradle প্রকল্পের নাম, গ্রুপ এবং সংস্করণ থেকে ক্ষমতা তৈরি করে। প্রকাশনায় সেট করা artifactId
, groupId
এবং version
সাথে মিলে যাওয়ার জন্য তিনটিই সেট আপ করতে হবে।
প্রকল্পের নামটি ডিফল্টভাবে এর পথের শেষ অংশ, তাই path :path:to:mylibrary
সহ একটি প্রকল্পের ডিফল্ট নাম হল mylibrary
। যদি আপনি artifactId
এর জন্য এটি ব্যবহার করতে না চান তবে আপনাকে আপনার প্রকল্পের নাম পরিবর্তন করতে হবে।
আপনার প্রকল্পের নাম পরিবর্তন করার জন্য দুটি বিকল্প আছে:
- প্রকল্পের ফোল্ডারের নাম পরিবর্তন করুন। এটি প্রকল্পের নাম, বা প্রকল্পের গ্রেডল পাথ পরিবর্তন করে, তাই প্রকল্পের সমস্ত নির্ভরতা আপডেট করা দরকার। প্রকল্পের নাম এবং ফোল্ডার একই রাখার সময় প্রাথমিকভাবে আরও পুনর্গঠনের কাজ তৈরি হতে পারে, এটি বিভ্রান্তি হ্রাস করে।
- প্রোজেক্টের ফোল্ডারের নাম পরিবর্তন না করে গ্রেডলে প্রোজেক্টের নাম পরিবর্তন করুন। এটি উত্স সংস্করণের উপর প্রভাব এড়ায়, তবে এটি প্রকল্পের অবস্থান এবং নামকে বিভক্ত করে।
Gradle এ প্রজেক্টের নাম পরিবর্তন করতে, settings.gradle
ফাইলে নিম্নলিখিত কোডটি প্রবেশ করান:
গ্রোভি
include ':path:to:mylibrary'
project(':path:to:mylibrary').name = 'my-library'
কোটলিন
include(":path:to:mylibrary")
project(":path:to:mylibrary").name = "my-library"
এই কোডটি প্রকল্পের নতুন পাথ :path:to:my-library
এ বরাদ্দ করে।
মান groupId
বিল্ড নামের সাথে ডিফল্ট হয়, যা সাধারণত রুট ফোল্ডারের নাম, এবং মান version
ডিফল্টভাবে অনির্দিষ্ট থাকে। গ্রুপ আইডি বা সংস্করণের মান পরিবর্তন করতে, আপনার প্রকল্প-স্তরের build.gradle
ফাইলে (Groovy) বা build.gradle.kts
(কোটলিন স্ক্রিপ্টের জন্য) যথাক্রমে group
এবং version
বৈশিষ্ট্যগুলি সেট করুন:
গ্রোভি
group = 'com.my-company'
version = '1.0'
কোটলিন
group = "com.my-company"
version = "1.0"
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।"],[],[],null,["# Configure test fixtures for publication\n\nWhile publishing test fixtures doesn't require any particular configuration\nof the publication, the\n[capability mechanism](https://docs.gradle.org/current/userguide/component_capabilities.html)\nused to handle fixtures does require an additional configuration.\n\nFor a given artifact with coordinates `groupId:artifactId:version`, Gradle\nexpects that the test fixtures artifact declares a capability with coordinates\n`groupId:artifactId-test-fixtures:version`. This is not currently done\nautomatically by either the test fixture support or the Maven Publish Plugin,\nand therefore must be done manually.\n\nGradle creates the capability from the project's name, group, and version.\nAll three must be set up to match the `artifactId`, `groupId`, and `version` set\nin the publication.\n\nThe project's name is the last segment of its path by default, so the default\nname of a project with the path `:path:to:mylibrary` is `mylibrary`. If this is\nnot what you want to use for `artifactId`, then you need to change your project\nname.\n\nThere are two options for renaming your project:\n\n- Rename the folder of the project. This changes the project name, or the Gradle path of the project, so all dependencies on the project need to be updated. While keeping the project name and folder the same might create more reorganization work initially, it reduces confusion.\n- Rename the project in Gradle without renaming the folder of the project. This avoids the impact on source versioning, but it splits the project location and name.\n\nTo rename the project in Gradle, insert the following code in the\n`settings.gradle` file: \n\n### Groovy\n\n```groovy\ninclude ':path:to:mylibrary'\nproject(':path:to:mylibrary').name = 'my-library'\n```\n\n### Kotlin\n\n```kotlin\ninclude(\":path:to:mylibrary\")\nproject(\":path:to:mylibrary\").name = \"my-library\"\n```\n\nThis code assigns the new path of the project to `:path:to:my-library`.\n\nThe value `groupId` defaults to the build name, which is generally the name of\nthe root folder, and the value `version` is by default unspecified. To change\nthe values of the group ID or version, set the `group` and `version` properties,\nrespectively, in your project-level `build.gradle` file (for Groovy) or\n`build.gradle.kts` (for Kotlin script): \n\n### Groovy\n\n```groovy\ngroup = 'com.my-company'\nversion = '1.0'\n```\n\n### Kotlin\n\n```kotlin\ngroup = \"com.my-company\"\nversion = \"1.0\"\n```"]]